Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Addressing player using variable after he joins?

I want to create a shop GUI that closes when player moves (when velocity.magnitude > 0) but I don't quite understand what the difference between CharacterAdded and PlayerAdded are,

and i can't picture any other way to do this apart from setting a variable to the player's name, and then using it like this: if player.velocity.magnitude>0 then.

Is there even a better or easier way to do this? So i wouldn't even have to set a variable to a player's name?

1 comment

0

make a module script that defines player then use requeire(modulescript) and whatever variable player is use that as the player

1 answer

PlayerAdded is an event for when a player joins the game.

Example: DzoJung joins the server -> Fire

CharacterAdded is an even for when ROBLOX generates your character into the server.

Examples: Respawning -> Fire

Character loading in server -> Fire

Anytime the character loads -> Fire

This discussion is preserved as it was. New answers, comments, and votes are closed.