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: Would i do it like this?

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 06:56 PM
Do i use WhileTouching stuff like this?

script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 9999999999999999999999999
end
end)

script.Parent.TouchEnded:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 100
end
end)


Like in fencing, you can only get damaged while touching the brick. Do i do it like this?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2013 06:57 PM
That's not how they did it but it would be the opposite, when they do touch the black base, it makes it 99999 etc.

In your script, if they jump, they get inf health -.-
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 06:58 PM
Whatever, not exactly the same scripts but would i use it like this?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2013 06:59 PM
Yes, but I think you mean the opposite.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 06:59 PM
Umm, didn't notice T_T

script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 100
end
end)

script.Parent.TouchEnded:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 9999999999999999999999999
end
end)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2013 07:00 PM
Testing is the #1 way to test.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 07:00 PM
Would it work?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 07:01 PM
bawt im so lazeh D:

and its faster just looking at the script :p
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
17 Aug 2013 07:02 PM
1) You're attempting to modify the player's health, without changing the player's max health meaning that when it's changed, it will reset back to the max health.
2) All they would have to do is jump, and they would become invincible.
3) You're better off using Region3, or magnitude.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 07:04 PM
1) Why? Whats the jump problem? explain.
2) Pretend like i changed Health to MaxHealth.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
17 Aug 2013 07:05 PM
Well think about it... 'TouchEnded' fires when the object stops touching the object, so if the player jumps they'll become 'invincible', because they've stopped touching the part.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 07:06 PM
Dang, your right -.- but if there was a huge/long invisible brick above the baseplate which i had the script in, even jumping can't make them invincible there.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2013 07:07 PM
Or, you could NOT use that method?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2013 07:09 PM
Why not use that method?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2013 07:12 PM
It's not as good as the normal fencing method, even magnitude is better.
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