Webb3 apr. 2024 · The PlayerAdded:Connect (function ... end) means you're setting up a function now to be called later when a player joins the game. It doesn't get run right away. Immediately after that, the script goes to your while loop. But currency hasn't been set to anything yet, so its value is just nil, making currency.Value invalid. Webbdon't use findfirstchild for things you already know exists. it's meant to be used to finding if something is an instance. the first argument in the playeradded event is just the player instance so instead you would replace it with player. try this line local char = workspace [ player.Name] what are you trying to do to that character anyway?
How to make a script only work on join in roblox - Stack Overflow
Webb10 nov. 2024 · 1 Answer Sorted by: 1 The PlayerAdded event fires as soon as the player joins the server, but their character model doesn't load into the world immediately. So you need to wait for the player's character model to spawb. Luckily, you can use the CharacterAdded event to know when that happens. Webbplayer.RespawnLocation = lobbySpawn end Add an events section beneath your module function. Then, connect onPlayerJoin () to Player Service's PlayerAdded event. -- Module … honey claws zookeeper lyrics
Events Roblox Creator Documentation
WebbRoblox has many built-in events. Some commonly used ones include Players.PlayerAdded for when a user joins your experience, Player.CharacterAdded for when a user's … Webb2 juli 2024 · The line game:GetService ("Players").PlayerAdded:Connect (onPlayerAdded) sets onPlayerAdded to be called whenever the PlayerAdded event fires, which occurs … WebbYou can assign a function, known as an event handler, to execute when an event fires. For example, you can create a function called onPlayerAdded () to the Players.PlayerAdded … honey clay donerland