local Players = game.Players:GetPlayers()
local RandomPlayer = Players[math.random(1,#Players)]
RandomPlayer.Character:BreakJoint()
I got this in output.
Workspace.Script:2: bad argument #2 to 'random' (interval is empty)
local Players = game.Players:GetPlayers()
local RandomPlayer = Players[math.random(1,#Players)]
RandomPlayer.Character:BreakJoint()
I got this in output.
Workspace.Script:2: bad argument #2 to 'random' (interval is empty)
Error at line 3: You did :BreakJoint(), the script probly took it as a 'nil' value. Try :BreakJoints() instead. :P
I hope this helped!
hmmm... nearly everything seems correct...
but don't do BreakJoints(), dobreakjoints() cos I tried that once, and I got an error so I kno that it should be loercase...
Well, I think it's because it needs to be a in a table.
game.Players:GetChildren()[math.random(1, #game.Players:GetChildren())] breakjoints
Probably something like that.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Somehow you are managing to have 0 players. If this is running at the start of a game, that's why. It should also be noted that
BreakJointis missing an "s" at the end.