it works :) I watched all the way through your video to make yours then tweaked it to spawn at random spawns. It works now! Thank you for making this tutorial so I could tweak it.
Hey, I'm like 2 months late, but how did you do it? I've tried literally everything I know to tweak the code, but I get placed in the neutral team or i spawn in the fighting area instead of the lobby upon joining. I'd appreciate some help
@@doomdyti recommend you start learn scripting and making small projects, then come to this video to understand what he is saying and understand how do you make a roundsystem yourself! I learnt some scripting so i came to this video and it makes sense now, sorry that i am 1 month late.
@@doomdyt i think loading the map from the script and removing the lobby would work. in ur situation just make sure that if ur in a round delete the spawn locations from the lobby and load it back by cloning the lobby from the server storage
Heres the working script local intermission = 10 local roundLength = 15 local inRound = game.ReplicatedStorage.InRound local status = game.ReplicatedStorage.Status inRound.Changed:Connect(function() if inRound.Value == true then for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char and char:FindFirstChild("HumanoidRootPart") then local humanRoot = char.HumanoidRootPart humanRoot.CFrame = game.Workspace.MapSpawn.CFrame end end else for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char and char:FindFirstChild("HumanoidRootPart") then local humanRoot = char.HumanoidRootPart humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame end end end end) local function round() while true do inRound.Value = false for i = intermission, 0, -1 do status.Value = "Round will start in " .. i .. " seconds" wait(1) end inRound.Value = true for i = roundLength, 0, -1 do status.Value = "Round will end in " .. i .. " seconds" wait(1) end end end spawn(round)
Thank you. But maybe can you make a tut on how to add so if 1 person is left then the game ends and at the beginning it says "Waiting for more players".
Heres the scripts: local intermition = 2 local roundLength = 5 local inRound = game.ReplicatedStorage.InRound local status = game.ReplicatedStorage.Status inRound.Changed:Connect(function() if inRound.Value == true then for i, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character local humanRoot = char:WaitForChild("HumanoidRootPart") humanRoot.Position = game.Workspace.MapSpawn.Position -- [ roblox doesn't work with CFrame in the workspace no more so it has to be position. ] end else for i, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character local humanRoot = char:WaitForChild("HumanoidRootPart") humanRoot.Position = game.Workspace.LobbySpawn.Position end end end) local function round() while true do inRound.Value = false for i = intermition, 0, -1 do status.Value = "Game will start in "..i.." seconds" wait(1) end inRound.Value = true for i = roundLength, 0, -1 do status.Value = "Game will end in "..i.." seconds" wait(1) end end end spawn(round)
A good solution for this would be creating a folder, placing all the spawn locations on the map into that folder, create a table for all of the spawn locations using :GetChildren() on the folder, then teleporting players to those locations randomly using math.random
@@mrrobot4951 task.wait(1) -- Can be removed later local Players = game:GetService("Players") local spawns = workspace.Spawns:GetChildren() local plrList = Players:GetPlayers() task.wait(2) -- Can be removed later for _, plr in pairs(plrList) do local num = math.random(1, #spawns) local rootPart = plr.Character.HumanoidRootPart print(plr) rootPart.CFrame = spawns[num].CFrame end
the working script that teleports you back to the lobby is this local intermission = 10 local roundLength = 15 local inRound = game.ReplicatedStorage.InRound local status = game.ReplicatedStorage.Status local function teleportPlayers(destination) for _, plr in pairs(game.Players:GetPlayers()) do if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then local humanRoot = plr.Character.HumanoidRootPart humanRoot.CFrame = destination.CFrame else plr.CharacterAdded:Wait() -- Wait for character to load if not present local char = plr.Character local humanRoot = char:WaitForChild("HumanoidRootPart") humanRoot.CFrame = destination.CFrame end end end inRound.Changed:Connect(function() if inRound.Value == true then teleportPlayers(game.Workspace.MapSpawn) else teleportPlayers(game.Workspace.LobbySpawn) end end) local function round() while true do inRound.Value = false for i = intermission, 0, -1 do status.Value = "Game will start in "..i.." seconds" wait(1) end inRound.Value = true for i = roundLength, 0, -1 do status.Value = "Game will end in "..i.." seconds" wait(1) end end end spawn(round)
I spent 15 minutes wondering why my output keeps saying my tp part is not a valid member of workspace only to realize my part was not anchored and flung into the void when I hit play.
I WAS WONDERING WHY MINE WAS NOT WORKING BUT WHEN I SAW YOUR COMMENT I KNEW THAT IS WHY MINE WASNT WORKING!!! You helped me out without even knowing thanks :)
Hello, i have a problem when i start the game im dont see my label and timer and i see this error :Unable to assign property Value. string expected, got boolean - Server - inro:47 im watched the video, all scripts are written without errors, string value, and spawns are too
If you want them to teleport to random points then this is the script for u local Intermision = 2 local RoundLength = 5 local InRound = game.ReplicatedStorage.InRound local Status = game.ReplicatedStorage.Status local Teleports = game.Workspace.Teleports InRound.Changed:Connect(function()
if InRound.Value == true then
for i, Player in pairs(game.Players:GetPlayers()) do
local Character = Player.Character local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local teleportLocations = Teleports:GetChildren()
if #teleportLocations > 0 then
local randomIndex = math.random(1, #teleportLocations) local randomLocation = teleportLocations[randomIndex] local teleportPosition = randomLocation.Position
HumanoidRootPart.CFrame = CFrame.new(teleportPosition) end
end
else
for i, Player in pairs(game.Players:GetPlayers()) do
local Character = Player.Character local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
HumanoidRootPart.Position = game.Workspace.SpawnTeleport end
end
end) local function round() while true do InRound.Value = false for i = Intermision, 0, -1 do Status.Value = "Game will start in "..i.." seconds" wait(1) end InRound.Value = true for i = RoundLength, 0, -1 do Status.Value = "Game will end in "..i.." seconds" wait(1) end end end
@@BuldsOffice Try looking at where every variable is parented too. That will help. The intermission is just in startergui. I might have messed up the script. Just look over it and change anything according to it :)
Why doesn’t the local script work for me??? I rewrote it like 3 times! Even in outputs it saysnthere isn’t any issues. Anyone got a working script I can use or something?
Hello! I have one question. How do I make it so when the round starts and everyone gets teleported, everyone gets an item (eg. everyone gets a sword) and then when they die then lose it
you could make it so that people fall from the sky and land on the map, but as they fall, they pass through an invisible nocollision part that gives the players a weapon, and loses those weapons after they die!
Nice video, but after i typed the script, i get a warning that says *value of type string cannot be converted to a number - Server - InRo:33* Does anyone know how to fix this? my script: local intermission = 10 local roundLength = 15 local inRound = game.ReplicatedStorage.InRound local status = game.ReplicatedStorage.Status inRound.Changed:Connect(function() if inRound.Value == true then for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char and char:FindFirstChild("HumanoidRootPart") then local humanRoot = char.HumanoidRootPart humanRoot.CFrame = game.Workspace.MapSpawn.CFrame end end else for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char and char:FindFirstChild("HumanoidRootPart") then local humanRoot = char.HumanoidRootPart humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame end end end end) local function round() while true do inRound.Value = false for i = intermission, 0, -1 do status.Value = "Round will start in " ..i.. " seconds" wait(1) end inRound.Value = true for i = roundLength, 0, -1 do status.Value = "Round will end in " ..i.. " seconds" wait(1) end end end spawn(round)
local intermission = 10 local roundLength = 15 local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local inRound = ReplicatedStorage.InRound local status = ReplicatedStorage.Status -- Reference to the Weapons folder in ReplicatedStorage local weaponsFolder = ReplicatedStorage:WaitForChild("Weapons") -- Reference to the Spawns folder in Workspace local spawnsFolder = Workspace:WaitForChild("Spawns") local matchOngoing = false -- Variable to track if a match is ongoing local function giveRandomWeapon(player) local weapons = weaponsFolder:GetChildren() if #weapons > 0 then local randomIndex = math.random(1, #weapons) local randomWeapon = weapons[randomIndex] -- Clone the weapon model and parent it to the player's character local weaponClone = randomWeapon:Clone() weaponClone.Parent = player.Backpack print(player.Name .. " received " .. randomWeapon.Name) else warn("No weapons found in the Weapons folder.") end end local function chooseRandomSpawn() local spawns = spawnsFolder:GetChildren() if #spawns > 0 then local randomIndex = math.random(1, #spawns) return spawns[randomIndex].CFrame else warn("No spawn points found in the Spawns folder.") return CFrame.new() -- Return the default CFrame if no spawn points are found end end local function round() inRound.Changed:Connect(function() if inRound.Value == true then matchOngoing = true -- Set the matchOngoing variable to true when the round starts for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanRoot = char:FindFirstChild("HumanoidRootPart") if humanRoot then -- Choose a random spawn point from the "Spawns" folder local spawnCFrame = chooseRandomSpawn() humanRoot.CFrame = spawnCFrame print("Player teleported to map spawn")
-- Give the player a random weapon giveRandomWeapon(plr) else warn("HumanoidRootPart not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end else for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanRoot = char:FindFirstChild("HumanoidRootPart") if humanRoot then humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame print("Player teleported to lobby spawn") else warn("HumanoidRootPart not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end end end) while true do inRound.Value = false for i = intermission, 0, -1 do status.Value = "Game Will Start In " .. i .. " seconds" wait(1) end inRound.Value = true matchOngoing = true -- Set the matchOngoing variable to true when the round starts for i = roundLength, 0, -1 do if matchOngoing then status.Value = "Match Ongoing - " .. i .. " seconds left" else status.Value = "Game Will End In " .. i .. " seconds" end wait(1) end matchOngoing = false -- Set the matchOngoing variable to false when the round ends -- Code to "kill" players when the round ends for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanoid = char:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Health = 0 -- This "kills" the player print("Player killed: " .. plr.Name) else warn("Humanoid not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end end end -- Event handler for player joining Players.PlayerAdded:Connect(function(player) if matchOngoing then status.Value = "Match Ongoing - Please wait for the next round." end end) -- Event handler for player chatting Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) if matchOngoing then print(player.Name .. " says: " .. message) end end) end) -- Event handler for player removing (leaving the game) Players.PlayerRemoving:Connect(function(player) print(player.Name .. " left the game.") end) spawn(round)
I don't want to upset you, but nothing you do works and I always fall by the wayside. When I receive your models, it turns out that your scenarios are incorrect and corrupt with those in your video. I don't want to upset you, but I hope what you do works. I'm sorry if I upset you, Reactive Metal:( ...
yo can you pls put the script from 1:11 to 11:00 i did the script but it ended up wrong for me, just reply to me and copy paste the script or update the disc
@@riffler9929 completely agree - all these people that expect a tutorial to perfectly be set up for THEIR game, just copy and paste code and boom - scripting isn't for everyone; maybe those lazy should just stick to playing the games if they can't be bothered to even type out a code.
Good tutorial but im trying to make a game like natural disaster survival, so once the round starts it spawns something, can you please tell me how to do that?
--i made it better . local intermission = 10 local roundLength = 15 local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local inRound = ReplicatedStorage.InRound local status = ReplicatedStorage.Status -- Reference to the Weapons folder in ReplicatedStorage local weaponsFolder = ReplicatedStorage:WaitForChild("Weapons") -- Reference to the Spawns folder in Workspace local spawnsFolder = Workspace:WaitForChild("Spawns") local matchOngoing = false -- Variable to track if a match is ongoing local function giveRandomWeapon(player) local weapons = weaponsFolder:GetChildren() if #weapons > 0 then local randomIndex = math.random(1, #weapons) local randomWeapon = weapons[randomIndex] -- Clone the weapon model and parent it to the player's character local weaponClone = randomWeapon:Clone() weaponClone.Parent = player.Backpack print(player.Name .. " received " .. randomWeapon.Name) else warn("No weapons found in the Weapons folder.") end end local function chooseRandomSpawn() local spawns = spawnsFolder:GetChildren() if #spawns > 0 then local randomIndex = math.random(1, #spawns) return spawns[randomIndex].CFrame else warn("No spawn points found in the Spawns folder.") return CFrame.new() -- Return the default CFrame if no spawn points are found end end local function round() inRound.Changed:Connect(function() if inRound.Value == true then matchOngoing = true -- Set the matchOngoing variable to true when the round starts for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanRoot = char:FindFirstChild("HumanoidRootPart") if humanRoot then -- Choose a random spawn point from the "Spawns" folder local spawnCFrame = chooseRandomSpawn() humanRoot.CFrame = spawnCFrame print("Player teleported to map spawn")
-- Give the player a random weapon giveRandomWeapon(plr) else warn("HumanoidRootPart not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end else for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanRoot = char:FindFirstChild("HumanoidRootPart") if humanRoot then humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame print("Player teleported to lobby spawn") else warn("HumanoidRootPart not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end end end) while true do inRound.Value = false for i = intermission, 0, -1 do status.Value = "Game Will Start In " .. i .. " seconds" wait(1) end inRound.Value = true matchOngoing = true -- Set the matchOngoing variable to true when the round starts for i = roundLength, 0, -1 do if matchOngoing then status.Value = "Match Ongoing - " .. i .. " seconds left" else status.Value = "Game Will End In " .. i .. " seconds" end wait(1) end matchOngoing = false -- Set the matchOngoing variable to false when the round ends -- Code to "kill" players when the round ends for _, plr in pairs(game.Players:GetPlayers()) do local char = plr.Character if char then local humanoid = char:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Health = 0 -- This "kills" the player print("Player killed: " .. plr.Name) else warn("Humanoid not found for player: " .. plr.Name) end else warn("Character not found for player: " .. plr.Name) end end end end -- Event handler for player joining Players.PlayerAdded:Connect(function(player) if matchOngoing then status.Value = "Match Ongoing - Please wait for the next round." end end) -- Event handler for player chatting Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) if matchOngoing then print(player.Name .. " says: " .. message) end end) end) -- Event handler for player removing (leaving the game) Players.PlayerRemoving:Connect(function(player) print(player.Name .. " left the game.") end) spawn(round)
How can you make so a thing like zombiespawners from replicated storage spawns in when the round starts and when the round ends it gets removed -------------------------------------[AUTHOR: reccur]-------------------------------- local intermission = 10 local roundLength = 15 local inRound = game.ReplicatedStorage.InRound local staus = game.ReplicatedStorage.Status local playingTeam = game.Teams.Playing local lobbyTeam = game.Teams.Lobby inRound.Changed:Connect(function()
if inRound.Value == true then
for i, plr in pairs(game.Players:GetChildren()) do
local char = plr.Character local humanRoot = char:WaitForChild("HumanoidRootPart")
for i, plr in pairs(game.Players:GetChildren()) do local char = plr.Character local humanRoot = char:WaitForChild("HumanoidRootPart") humanRoot.CFrame = game.Workspace.lobbySpawn.CFrame
plr.Team = lobbyTeam
end end end) local function round() while true do
local requiredPlayers = 1
repeat wait(1) staus.Value = "Atleast ".. requiredPlayers.." players are needed to start a round"
until #game.Players:GetChildren() >= requiredPlayers
inRound.Value = false
for i = intermission, 0, -1 do
staus.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
staus.Value = "Game will end in "..i.." seconds"
local playing = {}
for i, plr in pairs(game.Players:GetChildren()) do
if plr.Team.Name == "Playing" then
table.insert(playing, plr.Name)
end end
if #playing == -1 then staus.Value = "Everyone Has Died" wait(3) break end
if #playing == 1 then
staus.Value = playing[1].." Has Won The Game!"
for i, plr in pairs(game.Players:GetChildren()) do if playing[1] == plr.name then plr.leaderstats.Wins.Value += 1 end end
a couple things i have questions on 1. is there a way to have a map chose so players vote on the map that they will be teleported to 2. is there a way to have the spawn locations randomized in a specific area or to add more MapSpawn points so that not everyone is spawned on top of each other 3. is there a way to make it so that if you die you respawn on the Actual map and dont go back to the lobby if the round ends 4. lastly im not sure if this code already does this or not but is there a way to make it so that if you join the game while a round is ongoing you instanly join the round on the Map and not in the lobby other than these this code is great.
does anyone know how to make a spawn teleporter that is specific to one map and only that one map until time runs out and then when another map is chosen its specific to that map until time tuns out again?
it works :) I watched all the way through your video to make yours then tweaked it to spawn at random spawns. It works now! Thank you for making this tutorial so I could tweak it.
Hey, I'm like 2 months late, but how did you do it? I've tried literally everything I know to tweak the code, but I get placed in the neutral team or i spawn in the fighting area instead of the lobby upon joining. I'd appreciate some help
@@doomdyti recommend you start learn scripting and making small projects, then come to this video to understand what he is saying and understand how do you make a roundsystem yourself! I learnt some scripting so i came to this video and it makes sense now, sorry that i am 1 month late.
@@doomdyt i think loading the map from the script and removing the lobby would work. in ur situation just make sure that if ur in a round delete the spawn locations from the lobby and load it back by cloning the lobby from the server storage
@@doomdytMaybe its the name of the object. Like the script need to understand the variable. So make sure you don't miss variables.
Heres the working script local intermission = 10
local roundLength = 15
local inRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status
inRound.Changed:Connect(function()
if inRound.Value == true then
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char and char:FindFirstChild("HumanoidRootPart") then
local humanRoot = char.HumanoidRootPart
humanRoot.CFrame = game.Workspace.MapSpawn.CFrame
end
end
else
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char and char:FindFirstChild("HumanoidRootPart") then
local humanRoot = char.HumanoidRootPart
humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame
end
end
end
end)
local function round()
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Round will start in " .. i .. " seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Round will end in " .. i .. " seconds"
wait(1)
end
end
end
spawn(round)
Life saver, I typed it all out and had an error I couldn’t find. Your script worked. Thanks a lot!
you are a life saver
Thank you!
you are the best
love u man
first, and also you deserve more subs dude thx a lot
Thank you. But maybe can you make a tut on how to add so if 1 person is left then the game ends and at the beginning it says "Waiting for more players".
definetly
After 2 years and all of it still works is made respect bro
Thank you so much! Everything worked and it helped so much!
It didn’t work when I followed all the steps
Heres the scripts:
local intermition = 2
local roundLength = 5
local inRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status
inRound.Changed:Connect(function()
if inRound.Value == true then
for i, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.Position = game.Workspace.MapSpawn.Position
-- [
roblox doesn't work with CFrame in the workspace no more so it has to be position.
]
end
else
for i, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.Position = game.Workspace.LobbySpawn.Position
end
end
end)
local function round()
while true do
inRound.Value = false
for i = intermition, 0, -1 do
status.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Game will end in "..i.." seconds"
wait(1)
end
end
end
spawn(round)
did not work
False script btw
Idiots you have to have the assets
@@GermanCountryBall1711 oh??!?!?!?!?!
no guys its because he accidentally messed up his spelling on some things, at least make sure before doing it.
Thank you so much man.. this was my first script ever and i managed to get it on my second try.
when i tested it text label was empty and there was nothing going on
did you watch the full video
I tried to fix mine but for me, when I test it, there is no text whatsoever
How do you make different spawn points for example different team spawns.
I did the tutorial and even went to the pastebin, but for some reason line 30 (humanRoot.CFrame = game.Workspace.lobbySpawn.Position) wont work.
Nvm i realized that my part wasn’t anchored so it fell into the void and got deleted. Great tutorial! Thanks!
Do you know how I can make it so there is more than 1 teleport pad in the game area so people can spawn at different places?
A good solution for this would be creating a folder, placing all the spawn locations on the map into that folder, create a table for all of the spawn locations using :GetChildren() on the folder, then teleporting players to those locations randomly using math.random
@@bigben75630 say script
@@mrrobot4951
task.wait(1) -- Can be removed later
local Players = game:GetService("Players")
local spawns = workspace.Spawns:GetChildren()
local plrList = Players:GetPlayers()
task.wait(2) -- Can be removed later
for _, plr in pairs(plrList) do
local num = math.random(1, #spawns)
local rootPart = plr.Character.HumanoidRootPart
print(plr)
rootPart.CFrame = spawns[num].CFrame
end
@@bigben75630 thank
Thanks Men realy
the working script that teleports you back to the lobby is this
local intermission = 10
local roundLength = 15
local inRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status
local function teleportPlayers(destination)
for _, plr in pairs(game.Players:GetPlayers()) do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
local humanRoot = plr.Character.HumanoidRootPart
humanRoot.CFrame = destination.CFrame
else
plr.CharacterAdded:Wait() -- Wait for character to load if not present
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.CFrame = destination.CFrame
end
end
end
inRound.Changed:Connect(function()
if inRound.Value == true then
teleportPlayers(game.Workspace.MapSpawn)
else
teleportPlayers(game.Workspace.LobbySpawn)
end
end)
local function round()
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Game will end in "..i.." seconds"
wait(1)
end
end
end
spawn(round)
bro you are the best
i love you
Liar
I’ve wasted soo much time!
when all players die at the same time the timer still continues
How do i make it so a team wins depending on the number of kills they have when the round ends?
thats exactly what i wanted to do, have u found anything?
@@g4m3z24 nah, nothing yet
@@TQRtr oh well, i found one myself ;-;
@@g4m3z24 can you give me the name?
@@TQRtr ok
I spent 15 minutes wondering why my output keeps saying my tp part is not a valid member of workspace only to realize my part was not anchored and flung into the void when I hit play.
Can you send me the scripts?
I WAS WONDERING WHY MINE WAS NOT WORKING BUT WHEN I SAW YOUR COMMENT I KNEW THAT IS WHY MINE WASNT WORKING!!! You helped me out without even knowing thanks :)
No problem ;)@@Masimba24
@@proxzero my part is anchored and idk what to do
All the scripts don't work for me can someone help me pls
Same. It spawns me on my map moment I join I got no spawns
My timer is not working and I don't now why if some one can post a working Timer script here you're a life saver
broo thank you so much i have just subscribed for this! you are the beestt!
There is a warning or error message on the local script on the 5th line saying its wrong
can someone please help why int it showing up at all?
TYSMM I REALLY NEEDED THIS ONE MAN.GUYS PLEASE SUB TO HIM!!!
Hello, i have a problem when i start the game im dont see my label and timer and i see this error :Unable to assign property Value. string expected, got boolean - Server - inro:47
im watched the video, all scripts are written without errors, string value, and spawns are too
For the 'InRound' Value, it should be a BoolValue not a s String value, insert a bool value in Replicated Storage instead.
@@reactivemetal8956 Thank you so much, now its working.
It’s not working for me everything looks the same with no errors in the script I checked, slowed down and redid it don’t work
@@Originalsonic1991 if you have the same issue the status should be string value and inround should be bool value
I'm new to scripting, but this is old video subscribing is the onky way to approve you (pin pls)
helpful tutorial man thanks :D
didn't work, went through it twice and everything was fine. does it have something to do with my loading screen?
Same
If you want them to teleport to random points then this is the script for u
local Intermision = 2
local RoundLength = 5
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local Teleports = game.Workspace.Teleports
InRound.Changed:Connect(function()
if InRound.Value == true then
for i, Player in pairs(game.Players:GetPlayers()) do
local Character = Player.Character
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local teleportLocations = Teleports:GetChildren()
if #teleportLocations > 0 then
local randomIndex = math.random(1, #teleportLocations)
local randomLocation = teleportLocations[randomIndex]
local teleportPosition = randomLocation.Position
HumanoidRootPart.CFrame = CFrame.new(teleportPosition)
end
end
else
for i, Player in pairs(game.Players:GetPlayers()) do
local Character = Player.Character
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
HumanoidRootPart.Position = game.Workspace.SpawnTeleport
end
end
end)
local function round()
while true do
InRound.Value = false
for i = Intermision, 0, -1 do
Status.Value = "Game will start in "..i.." seconds"
wait(1)
end
InRound.Value = true
for i = RoundLength, 0, -1 do
Status.Value = "Game will end in "..i.." seconds"
wait(1)
end
end
end
I tried this but it just messes up the entire intermission. Can you please tell me where to put it? And if I need to change up certain stuff?.
@@BuldsOffice Try looking at where every variable is parented too. That will help. The intermission is just in startergui. I might have messed up the script. Just look over it and change anything according to it :)
@@MonstrumReborn ok
could you give me some details on how to use it and where to put it? also what do i have to fix>? i have no scriptin experience
@@MinecraftTutor-z9x it’s just the same as the normal script! Just replace it with this one :)
thank you bro explained clearly
how can i add random map system, victory and game over system and random spawn system?
please answer
it teleports me into the round but it doesn’t teleport me back into the lobby, the text works tho can someone help pls
Can you tell me how to do it with multiple game spawns?? PLEASE REACTIVE!!!!!
it worked but i didnt teleport
Thanks but when the time ended it didnt teleport me
This does not work it only shows 0 and it isnt even counting
Then try again
Fr bro ive been checking it so many times
I found the menthod to fix you need to... (im lazy to type)
@@tibeteast2984 JUST TYPE IT!
@@tibeteast2984 that's sad
When I test it, it says that LobbySpawn and MapSpawn aren't apart of workspace or something.
That means you don't have a mapSpawn or lobby spawn, or you just didn't name them correctly
@@reactivemetal8956 named them exactly like you, and the script.
@@earlynoob5538 yeah you have to name them exactly, if not you will have to modify the script
finnaly i can make fashion game on roblox
thats what im doingggg
How do i make the spawn randomised? Because if everyone spawns in one spot for a PvP everyone will die instantly
You should watch a tutorial, how to use teams
use a temporary pvp sheild, or put a block that randomly teleports them bellow the mapspawn
Bangers because bangers B)
didn't work
It doesn’t show the behavior option. Any help will be appreciated.
Why doesn’t the local script work for me??? I rewrote it like 3 times! Even in outputs it saysnthere isn’t any issues. Anyone got a working script I can use or something?
bucase you did failed timers
mine didn't work
Hello! I have one question. How do I make it so when the round starts and everyone gets teleported, everyone gets an item (eg. everyone gets a sword) and then when they die then lose it
you could make it so that people fall from the sky and land on the map, but as they fall, they pass through an invisible nocollision part that gives the players a weapon, and loses those weapons after they die!
@@RogerThyElite yeah
Nice video, but after i typed the script, i get a warning that says
*value of type string cannot be converted to a number - Server - InRo:33*
Does anyone know how to fix this? my script:
local intermission = 10
local roundLength = 15
local inRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status
inRound.Changed:Connect(function()
if inRound.Value == true then
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char and char:FindFirstChild("HumanoidRootPart") then
local humanRoot = char.HumanoidRootPart
humanRoot.CFrame = game.Workspace.MapSpawn.CFrame
end
end
else
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char and char:FindFirstChild("HumanoidRootPart") then
local humanRoot = char.HumanoidRootPart
humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame
end
end
end
end)
local function round()
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Round will start in " ..i.. " seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Round will end in " ..i.. " seconds"
wait(1)
end
end
end
spawn(round)
mine doesnt work wth
is it possible to make so you spawn at one map, round ends, then you spawn on a different map
yes
Watch a "Math.Random tutorial " then go from there
yea just make a math.random thingy where it picks between 2 random numbers and if its a certain number a certain map spawns lol
i t will took me all day to copy theese scripts now lol
local intermission = 10
local roundLength = 15
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local inRound = ReplicatedStorage.InRound
local status = ReplicatedStorage.Status
-- Reference to the Weapons folder in ReplicatedStorage
local weaponsFolder = ReplicatedStorage:WaitForChild("Weapons")
-- Reference to the Spawns folder in Workspace
local spawnsFolder = Workspace:WaitForChild("Spawns")
local matchOngoing = false -- Variable to track if a match is ongoing
local function giveRandomWeapon(player)
local weapons = weaponsFolder:GetChildren()
if #weapons > 0 then
local randomIndex = math.random(1, #weapons)
local randomWeapon = weapons[randomIndex]
-- Clone the weapon model and parent it to the player's character
local weaponClone = randomWeapon:Clone()
weaponClone.Parent = player.Backpack
print(player.Name .. " received " .. randomWeapon.Name)
else
warn("No weapons found in the Weapons folder.")
end
end
local function chooseRandomSpawn()
local spawns = spawnsFolder:GetChildren()
if #spawns > 0 then
local randomIndex = math.random(1, #spawns)
return spawns[randomIndex].CFrame
else
warn("No spawn points found in the Spawns folder.")
return CFrame.new() -- Return the default CFrame if no spawn points are found
end
end
local function round()
inRound.Changed:Connect(function()
if inRound.Value == true then
matchOngoing = true -- Set the matchOngoing variable to true when the round starts
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanRoot = char:FindFirstChild("HumanoidRootPart")
if humanRoot then
-- Choose a random spawn point from the "Spawns" folder
local spawnCFrame = chooseRandomSpawn()
humanRoot.CFrame = spawnCFrame
print("Player teleported to map spawn")
-- Give the player a random weapon
giveRandomWeapon(plr)
else
warn("HumanoidRootPart not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
else
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanRoot = char:FindFirstChild("HumanoidRootPart")
if humanRoot then
humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame
print("Player teleported to lobby spawn")
else
warn("HumanoidRootPart not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
end
end)
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game Will Start In " .. i .. " seconds"
wait(1)
end
inRound.Value = true
matchOngoing = true -- Set the matchOngoing variable to true when the round starts
for i = roundLength, 0, -1 do
if matchOngoing then
status.Value = "Match Ongoing - " .. i .. " seconds left"
else
status.Value = "Game Will End In " .. i .. " seconds"
end
wait(1)
end
matchOngoing = false -- Set the matchOngoing variable to false when the round ends
-- Code to "kill" players when the round ends
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanoid = char:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0 -- This "kills" the player
print("Player killed: " .. plr.Name)
else
warn("Humanoid not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
end
end
-- Event handler for player joining
Players.PlayerAdded:Connect(function(player)
if matchOngoing then
status.Value = "Match Ongoing - Please wait for the next round."
end
end)
-- Event handler for player chatting
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if matchOngoing then
print(player.Name .. " says: " .. message)
end
end)
end)
-- Event handler for player removing (leaving the game)
Players.PlayerRemoving:Connect(function(player)
print(player.Name .. " left the game.")
end)
spawn(round)
Is there a possible way for the round timer to stop if all players have died?
8:43 saving my spot
I don't want to upset you, but nothing you do works and I always fall by the wayside. When I receive your models, it turns out that your scenarios are incorrect and corrupt with those in your video. I don't want to upset you, but I hope what you do works. I'm sorry if I upset you, Reactive Metal:(
...
so in the
local char = plr.Character
local humanRoot =
i cant get the local hunamRoot to wait for childern
help?
same here
yo can you pls put the script from 1:11 to 11:00 i did the script but it ended up wrong for me, just reply to me and copy paste the script or update the disc
it does not teleport me :(
the text does not change:
Unable to assign property Text. string expected, got Instance
status.Value
Thanks man! Means alot
when it says game started it wont teleport me
nuh atleast add the script in discription i aint doing IT.
Same! Ims so lazy
@@Jacksonforever748yall should quit ngl coding isn't for ppl that cant even type
@@riffler9929 completely agree - all these people that expect a tutorial to perfectly be set up for THEIR game, just copy and paste code and boom - scripting isn't for everyone; maybe those lazy should just stick to playing the games if they can't be bothered to even type out a code.
with me when everything is done and i spawn into the game it just says lable at the top and nothing happens
same
Bro you are a Legend
how to make it so that there are multiple maps that rotate???
Didn’t work for me but probably did it wrong
Mine teleports me and everything but the number stays at 0 and im not sure why? please help.
There’s must be an error with your script, you should copy the script from the paste in link in the description.
@@reactivemetal8956 the thing happens to me, copied and pasted from the pastebin and still 0 in the text label.. do you know how to fix this?
Thank you so much the second work, but the teleporting part does not work. I rewatch the video like 10 times but thank you.😊😊
why doesnt this work for me?
pastebin.com/LAHP3tyB
I chocked somewhere so I am just gonna leave a personal timestamp for how far I got into the video 14:29
Good tutorial but im trying to make a game like natural disaster survival, so once the round starts it spawns something, can you please tell me how to do that?
It just says ‘Label’
it says unable to read property value for me.
Can you make win brick?
Hey Man Could you Just Copy and paste then code here it doesn't seem to work for me thanks
--i made it better .
local intermission = 10
local roundLength = 15
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local inRound = ReplicatedStorage.InRound
local status = ReplicatedStorage.Status
-- Reference to the Weapons folder in ReplicatedStorage
local weaponsFolder = ReplicatedStorage:WaitForChild("Weapons")
-- Reference to the Spawns folder in Workspace
local spawnsFolder = Workspace:WaitForChild("Spawns")
local matchOngoing = false -- Variable to track if a match is ongoing
local function giveRandomWeapon(player)
local weapons = weaponsFolder:GetChildren()
if #weapons > 0 then
local randomIndex = math.random(1, #weapons)
local randomWeapon = weapons[randomIndex]
-- Clone the weapon model and parent it to the player's character
local weaponClone = randomWeapon:Clone()
weaponClone.Parent = player.Backpack
print(player.Name .. " received " .. randomWeapon.Name)
else
warn("No weapons found in the Weapons folder.")
end
end
local function chooseRandomSpawn()
local spawns = spawnsFolder:GetChildren()
if #spawns > 0 then
local randomIndex = math.random(1, #spawns)
return spawns[randomIndex].CFrame
else
warn("No spawn points found in the Spawns folder.")
return CFrame.new() -- Return the default CFrame if no spawn points are found
end
end
local function round()
inRound.Changed:Connect(function()
if inRound.Value == true then
matchOngoing = true -- Set the matchOngoing variable to true when the round starts
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanRoot = char:FindFirstChild("HumanoidRootPart")
if humanRoot then
-- Choose a random spawn point from the "Spawns" folder
local spawnCFrame = chooseRandomSpawn()
humanRoot.CFrame = spawnCFrame
print("Player teleported to map spawn")
-- Give the player a random weapon
giveRandomWeapon(plr)
else
warn("HumanoidRootPart not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
else
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanRoot = char:FindFirstChild("HumanoidRootPart")
if humanRoot then
humanRoot.CFrame = game.Workspace.LobbySpawn.CFrame
print("Player teleported to lobby spawn")
else
warn("HumanoidRootPart not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
end
end)
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game Will Start In " .. i .. " seconds"
wait(1)
end
inRound.Value = true
matchOngoing = true -- Set the matchOngoing variable to true when the round starts
for i = roundLength, 0, -1 do
if matchOngoing then
status.Value = "Match Ongoing - " .. i .. " seconds left"
else
status.Value = "Game Will End In " .. i .. " seconds"
end
wait(1)
end
matchOngoing = false -- Set the matchOngoing variable to false when the round ends
-- Code to "kill" players when the round ends
for _, plr in pairs(game.Players:GetPlayers()) do
local char = plr.Character
if char then
local humanoid = char:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0 -- This "kills" the player
print("Player killed: " .. plr.Name)
else
warn("Humanoid not found for player: " .. plr.Name)
end
else
warn("Character not found for player: " .. plr.Name)
end
end
end
end
-- Event handler for player joining
Players.PlayerAdded:Connect(function(player)
if matchOngoing then
status.Value = "Match Ongoing - Please wait for the next round."
end
end)
-- Event handler for player chatting
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if matchOngoing then
print(player.Name .. " says: " .. message)
end
end)
end)
-- Event handler for player removing (leaving the game)
Players.PlayerRemoving:Connect(function(player)
print(player.Name .. " left the game.")
end)
spawn(round)
How can you make so a thing like zombiespawners from replicated storage spawns in when the round starts and when the round ends it gets removed -------------------------------------[AUTHOR: reccur]--------------------------------
local intermission = 10
local roundLength = 15
local inRound = game.ReplicatedStorage.InRound
local staus = game.ReplicatedStorage.Status
local playingTeam = game.Teams.Playing
local lobbyTeam = game.Teams.Lobby
inRound.Changed:Connect(function()
if inRound.Value == true then
for i, plr in pairs(game.Players:GetChildren()) do
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.CFrame = game.Workspace.MapSpawn.CFrame
plr.Team = playingTeam
char:WaitForChild("Humanoid").Died:Connect(function()
plr.Team = lobbyTeam
end)
end
else
for i, plr in pairs(game.Players:GetChildren()) do
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.CFrame = game.Workspace.lobbySpawn.CFrame
plr.Team = lobbyTeam
end
end
end)
local function round()
while true do
local requiredPlayers = 1
repeat
wait(1)
staus.Value = "Atleast ".. requiredPlayers.." players are needed to start a round"
until #game.Players:GetChildren() >= requiredPlayers
inRound.Value = false
for i = intermission, 0, -1 do
staus.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
staus.Value = "Game will end in "..i.." seconds"
local playing = {}
for i, plr in pairs(game.Players:GetChildren()) do
if plr.Team.Name == "Playing" then
table.insert(playing, plr.Name)
end
end
if #playing == -1 then
staus.Value = "Everyone Has Died"
wait(3)
break
end
if #playing == 1 then
staus.Value = playing[1].." Has Won The Game!"
for i, plr in pairs(game.Players:GetChildren()) do
if playing[1] == plr.name then
plr.leaderstats.Wins.Value += 1
end
end
wait(3)
break
end
wait(1)
end
wait(3)
end
end
spawn(round)
can you make timer and random spawn map plssss
Can you help? My game keeps crashing and idk why
How would I make it so there are multiple spawn points in the game?
For people you can add checkpoints all over your game!!
@@aribelzvlogsnot checkpoints. you need parts that will actually teleport them. if you use checkpoints then they can just spawn in the map.
TYSMMMMMMM
Dude why mine wont work i watched video 2 times and it not working
I copied everything he did, yet it would not teleport me. Can someone help me with this?
can you paste the script please because the player wont teleport
can someone help I keep getting teleported to the lobby after the countdown
Didn’t work for me
the label just freezes up and doesnt work very well. how can i fix that Reactive Metal?
nvm i fixed it. but i do have a question. how can i put multiple spawns so that players dont spawn in one place??
@@alexisninococa hlo? can u tell how th did u fix it
@@Official_mochamoon it was just the script that froze the label but it worked out when i started all over again
i did everything when i start the game it bringes me up to the air and kills me
Do you know where you put your map spawns? Or maybe they’re unanchored
Its not working I write the local script and its not working
It doesn’t show the countdown for me
a couple things i have questions on
1. is there a way to have a map chose so players vote on the map that they will be teleported to
2. is there a way to have the spawn locations randomized in a specific area or to add more MapSpawn points so that not everyone is spawned on top of each other
3. is there a way to make it so that if you die you respawn on the Actual map and dont go back to the lobby if the round ends
4. lastly im not sure if this code already does this or not but is there a way to make it so that if you join the game while a round is ongoing you instanly join the round on the Map and not in the lobby
other than these this code is great.
W
does anyone know how to make a spawn teleporter that is specific to one map and only that one map until time runs out and then when another map is chosen its specific to that map until time tuns out again?
How to make it spawn random places??
This really helps but i cant figure out how to make a new round start once there is 1 person standing
it didn’t work :(
fuck this sat at this for fricking 50 mins and EVEN THE SPAWN DOESNT WORK SAME AS THE FUCKING LABEL
I can't see the first part so I don't under stand what you did but great video besides that
Hii, if I want them to teleport to the team spawns ( red and blue) instead of mapspawn what can I do?
You should probably watch my Team-Based Round System Tutorial I made: th-cam.com/video/_9tVicm-JCA/w-d-xo.html
@@reactivemetal8956 Thankyou so much I subscribed 😊
@@Sarah-kq8uf Your welcome!
YEEEESSSSS
@reative metal can you make this put tp all in different spots plss
why is my teleporting not working i followed all the steps
Does anybody know how to make it so only 1 random player will TP here?
this is each time. When i do an titorial it fails i look at the comments : Thank You Sooo Much Now My Game is Sucsecful.
When i do it it fails :(
Hey i like your script but how do i add 2 maps in the round?