In my onJoin/onLeave script, the game runs into a problem. It tells me "Argument 1 missing or nil". This does not make sense to me, so my two questions are:
1 - What does this error mean? 2 - How can I fix this?
So first of all, this is the entire function:
function onPlayerJoin(Player)
local IMPRTNT = Instance.new('NumberValue')
IMPRTNT.Parent = Player
IMPRTNT.Name = 'CharType'
local val = script.Parent.Help.PlayerHelp.Extra:FindFirstChild()
val.Name = Player.Name
val.Value = Player.Name
if val.Parent.Parent.Parent.ReadyHelp.R1.Value == false then
repeat
wait()
until script.Parent.Help.ReadyHelp.R1.Value == true
val.Parent = val.Parent.Parent.P1
else
val.Parent = val.Parent.Parent.P1
end
end
The start, lines 2-4, inserts a value into the player for later use. The error occurs on line 6 where the programming tells the game to fetch a value to represent the player. It is supposed to do this and insert the player's information, but it says something about missing or nil. This may have to do with my use of the FindFirstChild function, but I cannot be sure. Feel free to comment and I will try to help. Thanks!
