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: textbutton issues

Previous Thread :: Next Thread 
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:09 PM
This is in a part>surfacegui>textbutton but it doesn't work.

script.Parent.MouseButton1Down:connect(function()
game.Players.fruitygeneration.Humanoid.Health = 0
end)
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:11 PM
the humanoid is not in your player
it is in your character
Report Abuse
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:11 PM
oh
Report Abuse
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:13 PM
it still doesn't do anything
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:15 PM
what did u write as ur script?
Report Abuse
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:15 PM
script.Parent.MouseButton1Down:connect(function()
game.Players.fruitygeneration.Character.Humanoid.Health = 0
end)
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:17 PM
since character is in workspace try this

script.Parent.MouseButton1Down:connect(function()
character = game.Workspace:findFirstChild("fruitygeneration")
if character and character:findFirstChild("Humanoid") then --check if it is there
character.Humanoid.Health = 0
end
end)
Report Abuse
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:19 PM
still doesn't work
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:19 PM
let me try it on a surface gui... brb
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:24 PM
script.Parent.MouseButton1Down:connect(function()
character = game.Workspace:findFirstChild("FutureWebsiteOwner")
if character and character:findFirstChild("Humanoid") then --check if it is there
character.Humanoid.Health = 0
end
end)

this works for me...
try clicking the button a few times maybe?
Report Abuse
fruitygeneration is not online. fruitygeneration
Joined: 21 Mar 2012
Total Posts: 585
11 Sep 2014 07:37 PM
nope
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
11 Sep 2014 07:38 PM
well... it works for me
i would check everything you have make sure it is a button and make sure your name matches the name in the script
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