|
| 21 Jun 2015 11:56 PM |
| Where should I parent local scripts if I don't want them to restart when the player dies or resets? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Jun 2015 11:58 PM |
What is the situation in which you wouldn't want them to run again?
I would just say clone the scripts into the player when they join so you dont have to worry about destroying them later after they die..that is if they dont stay in the playergui or wherever |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2015 11:59 PM |
| I am making a gui only game, so the player should never die, but if they reset, it restarts the scripts, interrupting the game. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 22 Jun 2015 12:02 AM |
Oh. Thats easy. Just rename the humanoid in a local script to prevent them from resetting from the game menu
local player = game.Players.LocalPlayer local char = player.Character
for i,v in next, char:GetChildren() do if v:IsA("Humanoid") then v.Name = "Human" end end |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 12:03 AM |
Never mind. I figured out how.
Under StarterPlayer there is an instance called "StarterPlayerScripts" in which scripts do not restart when a player dies. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|