How would you execute a local script during a function in a different and nonlocal script?
✓ ANSWER ACCEPTED
how to execute a local script during a function in a different script?
1 answer
✓ Accepted answer
Put the script into StarterPlayerScripts or into a Gui and turn ResetPlayerGuiOnSpawn off and then use the following:
player=game.Players.LocalPlayer
hum=player.Character:WaitForChild("Huminoid")
hum.Died:connect(function()
--Stuff to do when they die
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
