#im trying to fix an error in my code
57 messages · Page 1 of 1 (latest)
the issue is
the username underlined in red
the ones near the bottom
it says
unknown global variabel
variable
but i have it set right here
which function
onPlayerAdded
i dont think this is inside any function
Just make it global
defining means telling the computer that a variable with a name exists
username = player.Name
Orange underline
Not an error
Just the script telling you "Hey maybe you shouldnt do that"
But still works
hello?
local username
Players.PlayerAdded:connect(function(plr)
username = plr.Username
End)
💀
@gritty berry
okay, Goofy guy the problem with that is that there's no player! in that scope
you cannot just ask for a player name anywhere