generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Remove health script on player entry

Previous Thread :: Next Thread 
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
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 is not online. 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
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
08 Feb 2014 10:10 PM
@Goul

Yes but I'd like to delete only the script, not the health GUI.
Report Abuse
iBlackouts is not online. iBlackouts
Joined: 05 Sep 2008
Total Posts: 232
08 Feb 2014 10:12 PM
Do you want it to loopkill or just to where they are basically godded?
Report Abuse
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
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 is not online. 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
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
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 is not online. 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 is not online. 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
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
08 Feb 2014 10:30 PM
@zac

Didn't work. Tested in solo mode.

@Goul

I deleted the Health script manually.
Report Abuse
DataStore is not online. 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 is not online. zac4545
Joined: 19 Aug 2009
Total Posts: 2324
08 Feb 2014 10:38 PM
^
Report Abuse
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
08 Feb 2014 10:39 PM
@Data

Starting a server and starting player will though, right?
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
08 Feb 2014 10:39 PM
@Lua,
Correct.
Report Abuse
LuaDebugger is not online. LuaDebugger
Joined: 29 Oct 2013
Total Posts: 5593
08 Feb 2014 10:46 PM
@data

It still didn't work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image