Uh so i tried to teleport players before and it works fine. But for some reason it is not working today. Here is my code:
wait(10) for i,v in pairs(game.Players:GetPlayers()) do v.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(3,3,3) end print("done")
It prints 'done' without teleporting the player. I have no idea what happened. Anybody can solve this? Thanks.
I think you should use this:
local Players = game:GetService("Players") for i, plrs in pairs(Players:GetPlayers()) do plrs.Character:SetPrimaryPartCFrame(CFrame.new(YOURPOS)) end
YOURPOS is the vector3value or CFrame value that is gonna be inputted. Replace the YOURPOS with a value or make it a variable with that value. Hope this works and if this one doesn't follow the one above mine.
Try this:
local s = script.Stat t = 0 while true do t = 15 repeat t = t-1 s.Value = “Intermission.. “..t wait(1) until t == 0 s.Value = “Game starting!” wait(2) local plrs = game.Players:GetChildren() for i = 1, #plrs do local num = math.random(1,32) plrs[i].Character.Head.CFrame = CFrame.new(workspace.Teleports[“Part”..num].Position) end t=100 repeat t = t-1 s.Value = t..” seconds left” wait(1) until t ==0 end
I think you should replace CFrame with Vector3, like this:
wait(10)
for i,v in pairs(game.Players:GetPlayers()) do v.Character:WaitForChild("HumanoidRootPart").CFrame = Vector3.new(POSITION) end print("done")
(Remember to replace "POSITION" with the position that you want to teleport the players.)
Good luck!