Hi,I am trying to make a Runner game,But when I teleport the players,the get stuck in the spawn loacation in the map as i am a amateur in scripting i know how to make teleport etc.But how do i prevent them from getting stuck heres a script i made
local replicatedstorage = game:GetService("ReplicatedStorage") local status = replicatedstorage:WaitForChild("StatusValue") while true do -- Intermission for i = 30,1,-1 do status.Value = "Intermission: "..i wait(1) end function teleAll(x, y, z) local pos = Vector3.new(-42.3, 210.501, -1221.65) for _, plr in pairs(Game:GetService("Players"):GetPlayers()) do if plr.Character then plr.Character:MoveTo(pos) end end end teleAll(-42.3, 210.501, -1221.65) status.Value = "Game in progress" local replicatedstorage = game:GetService("ReplicatedStorage") local status =replicatedstorage:WaitForChild ("Knife") local map = game.ServerStorage.Greenhils map:Clone().Parent = game.Workspace wait(180) game.Workspace.Greenhils:Destroy() status.Value = "Game Over!" end
Increase the 'y' position of your Vector3 to spawn the players slightly above the SpawnLocation.