Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to execute a local script during a function in a different script?

Asked by 8 years ago

How would you execute a local script during a function in a different and nonlocal script?

1 answer

Log in to vote
0
Answered by 8 years ago

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)
Ad

Answer this question