I'm having a bit of trouble with this. It says I can't use math.random, but I'm not sure what else to use. 'Up' is a member of the Player (There's a script for it). Could someone help me out?
s = game.Workspace:GetChildren()
function Down()
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name == "SpawnLocation" then
plr.Character:MoveTo(math.random(1,v.Position))
a = false
end
end
end
function Up()
for i,v in pairs(game.Workspace.Lobby:GetChildren()) do
if v.Name == "SpawnLocationU" then
plr.Character:MoveTo(math.random(2,v.Position))
end
end
end
game.Players.PlayerAdded:connect(function(p)
game.Workspace.CharacterAdded:connect(function(char)
if p.Up.Value == false then
Down()
elseif p.Up.Value == true then
Up()
end
end)
end)

3 comments
Player is not defined so I'm going to do major editing! :)
Can you cut off the parts you do not have errors on?
@Hex, You may be right. Fail..... I'll go check it out (I was helping him with this script)