|
| 08 Feb 2014 09:50 PM |
So I made a simple script that removes the health script (healing script) from the player on entry but it won't work. No output errors or anything. What is wrong? :(
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character.Health:Destroy() end) end)
|
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 08 Feb 2014 10:01 PM |
game.Players.PlayerAdded:connect(function(player) if player.Character then player.PlayerGui.HealthGui:Destroy() end end) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2014 10:10 PM |
@Goul
Yes but I'd like to delete only the script, not the health GUI. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2014 10:12 PM |
| Do you want it to loopkill or just to where they are basically godded? |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2014 10:15 PM |
@i
I want to remove the Health script that makes them heal. So basically, when they take damage they don't heal. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 08 Feb 2014 10:16 PM |
| Then go to the child of the HealthGUI that has the functions in it and Delete that. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2014 10:19 PM |
| But the health GUI has no scripts I thought. I'm certain the "Health" script in your character controls healing because when I delete it, I won't heal. |
|
|
| Report Abuse |
|
|
zac4545
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 2324 |
|
|
| 08 Feb 2014 10:21 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(chr) chr:WaitForChild("Health"):Destroy() end) end) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 08 Feb 2014 10:22 PM |
| So you've already tested and deleting that works?! so why did you post this? |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2014 10:30 PM |
@zac
Didn't work. Tested in solo mode.
@Goul
I deleted the Health script manually. |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 08 Feb 2014 10:36 PM |
"Tested in solo mode"
The 'PlayerAdded' event doesn't fire in solo mode. The player is added before the scripts are. |
|
|
| Report Abuse |
|
|
zac4545
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 2324 |
|
| |
|
|
| 08 Feb 2014 10:39 PM |
@Data
Starting a server and starting player will though, right? |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
| |
|
|
| 08 Feb 2014 10:46 PM |
@data
It still didn't work. |
|
|
| Report Abuse |
|
|