Is their a way to make the script instantly run the second the character has loaded?
You can make a script run on character load by using the CharacterAdded event of player. This is fired whenever the player respawns or changes. It would look something like,
game.Players.PlayerAdded:connect(function(plr) --Get the player from this event. plr.CharacterAdded:connect(char) --The Character added event returns a object value, being the character. char:FindFirstChild('Humanoid').Name = 'PlayerControl' --This I heard will disable the ROBLOX resetting. So if you want an anti reset script, this is it. end) end)
Well, first I'm gonna say, that was some interesting grammar, and it took me a while to figure it out, but I think I know where you're going.
You want to wait until a character is fully loaded before moving on to the script. This is quite simple to do. Basically all you need to do is add a repeat function;
make sure that this is a localscript
, inside any local folder such as StarterGui
or StarterPack
this code will also go on the VERY TOP of the script
repeat wait() until game.Players.LocalPlayer.Character print("Character has loaded") --do stuff--
Basically the first line yields the script from going on until the character is no longer nil
. Once the character has loaded, your script will continue!
Once again make sure this is a localscript
inside any local element like StarterGui
or StarterPack
Hope this helps!