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

How to make players teleport randomly to parts?

Asked by 2 years ago
Edited 2 years ago

inround.Changed:Connect(function() if inround.Value == true then for i, plr in pairs(game.Players:GetChildren()) do local char = plr.Character.HumanoidRootPart if forestmapworkspace == true then local random = math.random(1, #maps:WaitForChild("Forest"):WaitForChild("TPParts"):GetChildren()) local tpparts = maps:WaitForChild("Forest"):WaitForChild("TPParts"):GetChildren() char.CFrame = random.CFrame elseif mountainsmapworkspace == true then local random = math.random(1, #maps:WaitForChild("Mountains"):WaitForChild("spawnparts"):GetChildren()) char.CFrame = random.CFrame else print("InroundChanged Not Working") end end end end)

This is what I've tried so far but it doesn't work

0
Please but your code inside a Code Block, so we can actually see it WoTrox 345 — 2y

Answer this question