local c = game.Players:GetChildren()
local r = math.random(1,game.Players.NumPlayers)
local hum = plr.Character:WaitForChild("Humanoid")
RANDOMPERSON = nil
for i = 1,#c do
if i == r then
RANDOMPERSON = c[i]
sword = game.Lighting.Sword5:Clone()
sword.Parent = RANDOMPERSON.Backpack
hum.WalkSpeed = 22
hum.Health = 250
end
end
I got an error saying
Workspace.Map_Changer:93: attempt to index global 'plr' (a nil value)

4 comments
I got an error. Workspace.Map_Changer:93: attempt to index field 'Character' (a nil value)
yes... thats wat I mean u didnt define plr... and who Thumbs Down on my Answer, is a Diphole! am saying the Answer!
also... if u wondering y is it a problem... well cos if u didnt define
plrthen, how would the System know where to look for something... u get me?another idiot that Thumbs Down, just, just NOOBS!!! I got no Words to say! Shame on all u Noobs! Idiots, first try this and try wat was in his Script! then Judge wether its a Fix or piece of Crap words! seriously! Idiots!