Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Addressing player using variable after he joins?

Asked by 6 years ago

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?

0
make a module script that defines player then use requeire(modulescript) and whatever variable player is use that as the player greatneil80 2647 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

Ad

Answer this question