|
| 03 Oct 2016 08:09 PM |
this is in the player
"h = script.Parent.Humanoid.Health b = script.Parent.Humanoid
ko = true
while true do wait(0.1) if h.Value < 15 then b.PlatformStand.enabled = true wait(10) b.PlatformStand.enabled = false end end"
but i get this error when i run it "Workspace.Player1.Script:8: attempt to index global 'h' (a number value)"
Pale was a simple man who liked good music and advanced literature and writing symphonies. One dawn morning in the day he was out painting the ocean that was visible outside his penthouse on the cliffs of Maine, when he heard the doorbell ring. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:12 PM |
basically, what it's supposed to do is detect when the player's health drops below 15 then make them do a platform stand for 10 seconds
Pale was a simple man who liked good music and advanced literature and writing symphonies. One dawn morning in the day he was out painting the ocean that was visible outside his penthouse on the cliffs of Maine, when he heard the doorbell ring. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:17 PM |
try this
h = script.Parent.Character.Humanoid.Health b = script.Parent.Character.Humanoid db = true -- Debounce ko = true
while true do wait(0.1) if db == true then db = false if h.Value < 15 then b.PlatformStand.enabled = true wait(10) b.PlatformStand.enabled = false db = true end end end
when editing the character always remember that you have to enter the Character itself first
|
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:27 PM |
the script is already in the character actually, I tried using what you said and put it in starter player scripts instead of starter character scripts and i still got the same error "attempt to index global 'h'(a number value)" sadly
Pale was a simple man who liked good music and advanced literature and writing symphonies. One dawn morning in the day he was out painting the ocean that was visible outside his penthouse on the cliffs of Maine, when he heard the doorbell ring. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:31 PM |
| h = script.Parent.Character.Humanoid b = script.Parent.Character.Humanoid db = true -- ######## ko = true while true do wait(0.1) if db == true then db = false if h.Health < 15 then b.PlatformStand.enabled = true wait(10) b.PlatformStand.enabled = false db = true end end end when messing with values like that don't ### Value, ### the actual name your editing. its like calling your stepdad by ### name instead of what your supposed to call him. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:32 PM |
i hate roblox.
h = script.Parent.Character.Humanoid.Health b = script.Parent.Character.Humanoid db = true -- Debounce ko = true
while true do wait(0.1) if db == true then db = false if h.Health =< 15 then b.PlatformStand.enabled = true wait(10) b.PlatformStand.enabled = false db = true end end end
|
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 08:48 PM |
thanks for trying to help me
Pale was a simple man who liked good music and advanced literature and writing symphonies. One dawn morning in the day he was out painting the ocean that was visible outside his penthouse on the cliffs of Maine, when he heard the doorbell ring. |
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
|
| 03 Oct 2016 08:55 PM |
local human = script.Parent:WaitForChild("Humanoid") local blocking = false
human.HealthChanged:connect(function() if not blocking then if human.Health < 15 then blocking = true human.PlatformStand = true wait(10) human.PlatformStand = false blocking = false end end end) |
|
|
| Report Abuse |
|
|