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

My random spawn script not working and no error why doesnt work!?

Asked by 6 years ago

Why my random spawn script not work??! Not error! Just it not work! Why? I don't understand why?

---< Variables
local PlayerService = game:GetService('Players')
local WorkspaceService = game:GetService('Workspace')

local Spawns = WorkspaceService.AllSpawns:GetChildren()

--< Events
PlayerService.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        Character:MoveTo(Spawns[math.random(1, #Spawns)].Position)
    end)
end)
2
Add wait() before you set the players position. This is a know issue with Roblox. User#5423 17 — 6y

Answer this question