Log in to vote

Module scripted parented to a local script runs before player loads, have to reset for it to work?

Asked by 8 months ago

As the title says, I have a module script which has a parent, local script but it runs before the player loads rendering it useless until you reset, then it works fine. How can I fix this?

1 answer

Log in to vote
Answered by
enes223 312 Moderation Voter
8 months ago

You can wait for local player's character to load with the CharacterAdded event on the player, you just need to wait for the event to fire, example script:

local plr = game.Players.LocalPlayer
print("Character loaded!")

Answer this question