Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my script not working?

Asked by 10 years ago

This is my whole script It dosent go past line 34 somewhere? Here it is:

while true do TeleportLocation = Vector3.new(248.01, 74.84, 162.94) h = Instance.new("Hint") h.Parent = game.Workspace h.Text = "Checking Players" print("Control script loaded") local p = game.Players:getChildren() local h = Instance.new("Hint") while #p < 2 do h.Text = "Waiting for another player" h.Parent = game.Workspace game.Players.ChildAdded:wait() p = game.Players:getChildren() print("Succesful") h.Text = "Another Player Found!" wait(1) h.Text = "Please wait while Round Starts!" waitTime=60 repeat wait(1) waitTime = waitTime-1 until waitTime == 0 if waitTime == 0 then

h.Text = "Starting Round" wait(1) h.Text = "Choosing Map" wait(1) game.Lighting.field1:clone().Parent = game.Workspace h.Text = "Teleporting!"

wait(1)

local PlayerGet = game.Players:GetPlayers() local ObjectName = "Speed Coil" --change to object in lighting

for i,v in pairs(PlayerGet) do v.Character:MoveTo(TeleportLocation + Position) end

h.Text = "Game in progress [2 Minutes]" game.Lighting[ObjectName]:Clone().Parent = game.Players[tostring(PlayerGet[math.random(1,#PlayerGet)])].Backpack

waitTime=60 repeat wait(1)waitTime=waitTime-1 until waitTime == 0 if waitTime == 0 then

h.Text = "Round over!" wait(1)

PlayersInGame[i].Character:BreakJoints() wait(3)

game.Workspace.field1:remove()

end end end end end

Answer this question