|
| 15 Sep 2015 05:57 PM |
v light.Touched:connect(function(daa) local hum = daa.Parent:findFirstChild("Humanoid") if hum then hum:takeDamage(32) end end)
problem: also damages my humanoid.Health. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 05:58 PM |
| isn't that what it's supposed to do |
|
|
| Report Abuse |
|
|
Hvxbyte
|
  |
| Joined: 19 Aug 2015 |
| Total Posts: 410 |
|
| |
|
|
| 15 Sep 2015 05:59 PM |
| I don't want it to damage my health |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 06:01 PM |
light.Touched:connect(function(daa) local hum = daa.Parent:findFirstChild("Humanoid") if hum then FUNCTION HERE end end) |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 06:07 PM |
| lmfao what do you want it to do then, what DID YOU EXPECT, for :takeDamage? lmao the forums these days just keep getting better and better. |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Sep 2015 06:10 PM |
| I'm only 11, I have alot to learn. |
|
|
| Report Abuse |
|
|
Hvxbyte
|
  |
| Joined: 19 Aug 2015 |
| Total Posts: 410 |
|
| |
|
| |
|
NotAshley
|
  |
| Joined: 16 Jan 2014 |
| Total Posts: 14257 |
|
|
| 15 Sep 2015 06:30 PM |
TakeDamage damages the humanoid's health. It does nothing else.
What else are you trying to do? |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 06:37 PM |
"im only 11"
that shouldn't make a difference
at 8 I knew what damage meant
#code print ("Shots fired, ready for the war!") -- Currently working on Gui's |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 06:54 PM |
"At 8 I knew what damage meant" but did you know how to script?
I am also trying to prevent damage to myself. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 06:55 PM |
I was actually teaching myself Javascript
still you should know what "damage" means at 11
thats a little ridiculous
#code print ("Shots fired, ready for the war!") -- Currently working on Gui's |
|
|
| Report Abuse |
|
|
NotAshley
|
  |
| Joined: 16 Jan 2014 |
| Total Posts: 14257 |
|
|
| 15 Sep 2015 06:55 PM |
| You haven't told us what you're trying to do. The very definition of TakeDamage is dealing damage to a humanoid, yet you're saying you want something else to happen instead. What is that thing that you want to happen? |
|
|
| Report Abuse |
|
|
Hvxbyte
|
  |
| Joined: 19 Aug 2015 |
| Total Posts: 410 |
|
|
| 15 Sep 2015 07:57 PM |
"I am also trying to prevent damage to myself."
It's right in front of you... |
|
|
| Report Abuse |
|
|
Raphael7
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
|
| 15 Sep 2015 07:59 PM |
TakeDamage is pretty self explanatory; take... damage... if that doesn't help; http://wiki.roblox.com/index.php?title=API:Class/Humanoid/TakeDamage |
|
|
| Report Abuse |
|
|
Hvxbyte
|
  |
| Joined: 19 Aug 2015 |
| Total Posts: 410 |
|
|
| 15 Sep 2015 08:42 PM |
The first example is for defined players only (obviously, you define the players in the table Gods).
local Gods = { "tentergram"; }
local Check = function(Player) for _, God in next, Gods do if Player.Name:lower() = God:lower() then return true; end end end
game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) if Check(Player) == true then local Humanoid = Character:FindFirstChild("Humanoid"); Humanoid.Changed:connect(function(Health) Humanoid.Health = Humanoid.MaxHealth; end end end) end)
However, if you want everyone to be, said 'invincible', then:
game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) local Humanoid = Character:FindFirstChild("Humanoid"); Humanoid.Changed:connect(function(Health) Humanoid.Health = Humanoid.MaxHealth; end end) end) |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2015 08:45 PM |
how 2 make urself god moed in robux:
furst make an player(haha god)den u godmoed him and win ha nubs thes dais
game.Players.PlayerAdded:connect(function(player) if player.Name == "tentergram" then wait(5) player.Character.Humanoid.Health = math.huge end end)
(This is my signature): Im extremely sarcastic, but most of the time I will provide useful info for you! :) |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2015 01:49 PM |
Found a solution you guys weren't very helpful. |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2015 02:00 PM |
| We are never helpful. If you need help... I don't know. |
|
|
| Report Abuse |
|
|
Pinkerten
|
  |
| Joined: 03 Aug 2014 |
| Total Posts: 840 |
|
|
| 19 Sep 2015 02:06 PM |
| We are always helpful but your a dumbass |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2015 02:08 PM |
you're a dumbass when it comes to grammar. Also, because I don't know certain things about scripting, makes me a dumbass? that's like calling 48% of the world dumbass. |
|
|
| Report Abuse |
|
|
Pinkerten
|
  |
| Joined: 03 Aug 2014 |
| Total Posts: 840 |
|
|
| 19 Sep 2015 02:10 PM |
the function "Take damage" damages the humanoid, it is 100% obvious and has nothing to do with scripting. You expected to do something else. WHICH YOU NEVER TOLD US. Im sure someone would have helped you if you actually told us what you wanted to accomplish. But no you just sat there and did nothing. |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2015 02:11 PM |
you dont want him to take damage anymore? #code okay |
|
|
| Report Abuse |
|
|