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

How can I run code when the player is for sure in the game and is all loaded in?

I'm not sure, but do you use player added pr something similar to that? for example (i dont know how to use player added or set it up)

--localplayer added  part

--code 
print"this is where the code goes and localplayer loaded in "

end

if you need any clarifictaion ask! thanks

1 answer

✓ Accepted answer

You can have a local script inside of the StarterCharacterScripts This is where you'd find it.

The scripts inside there run every time the character loads into game

if you only want to do something ONCE when the

edit: you can also do this to make code run whenever a player joins a game

game.Players.PlayerAdded:Connect(function(player)
	print("A player has entered: " .. player.Name)
end)

2 comments

0

thanks!

0

Added some stuff to my answer. You can also do something once a player joins the game for the first time with PlayerAdded. But it has to be somewhere such as the workspace or serverscriptservice to work.

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