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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Aug 2013 06:59 PM |
| Yes, but I think you mean the opposite. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Aug 2013 07:00 PM |
| Testing is the #1 way to test. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Aug 2013 07:07 PM |
| Or, you could NOT use that method? |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
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 |
|
|