Kill brick problems
7 months ago
| 22
• By WEX
I need help:
My script is - - -
script.Parent.Touched:Connect(function(collision)
if collision:IsA("Player") then
collision.Health -= 15
end
end)
and I'm trying to make it take away health instead of instantly killing you. What seems to be wrong?
7 months ago
• By WaterMelon1
WEX 7 months ago
I need help: My script is - - - script.Parent.Touched:Connect(function(collision) if collision:IsA("Player") then collision.Health -= 15 end end) and I'm trying to make it take away health instead of instantly killing you. What seems to be wrong?
instead of collision.health -= 15 do
collision.health = collision.health - 15
6 months ago
• By Index
• 9d
mog 7 months ago
also im not a coder but shouldnt it be collision.Health = collision.Health - 15?
Correct, Polytoria doesn't have fancy operators that Roblox does.
Change "collision.Health -= 15" to "collision.Health = collision.Health - 15"
^ along with this, you should also add a debounce to delay the next damage.
hey, I'm Index!