|
| 27 Aug 2011 09:20 AM |
| and it seems i cant get this super simple script to work. Alt: MyEpicBacon. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 09:20 AM |
Do I need magic to see it? :o
~ I fail, You win. Life is harsh like that. ~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Aug 2011 12:13 PM |
oops i forgot to put it. function ot(hit) if (script.Parent.hit.Parent:findFirstChild(Humanoid)~=nil) then script.Parent.hit.Parent.Humanoid.Health = 50 end end
script.Parent.Touched:connect(ot) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:16 PM |
| hit is not a valid member of Part. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:17 PM |
function ot(hit) local Hum = hit.Parent:findFirstChild("Humanoid") if Hum then Hum.Health = 50 end end
script.Parent.Touched:connect(ot) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:19 PM |
script.Parent.Touched:connect(function (t) if t.Parent:FindFirstChild("Humanoid") then t.Parent.Humanoid.Health = 50 end end)
Shortest script :D |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:20 PM |
| Ok. it works now. thanks. I should of stayed lol. i |
|
|
| Report Abuse |
|
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
|
| 27 Aug 2011 12:23 PM |
@Pre
script.Parent.Touched:connect(function(s)pcall(function()game.Players:GetPlayerFromCharacter(s.Parent).Humanoid.Health=50 end)end) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:25 PM |
@Bloob: uhhh, Humanoid is not a valid member of Player.
script.Parent.Touched:connect(function (t) pcall(function() t.Parent.Humanoid.Health = 50 end) end) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2011 12:35 PM |
| I just made it the way he did :T |
|
|
| Report Abuse |
|
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
| |
|