OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 20 Jan 2017 09:36 PM |
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=613286590"
debounce = false
script.Parent.Activated:connect(function(activated) local player = game.Players.LocalPlayer local Humanoid = player.Character.Humanoid if script.Combatting.Value == false then script.Disabled = false script.Combatting.Value = true local animTrack = Humanoid:LoadAnimation(animation) animTrack:Play() wait(0.5) animTrack:Stop() wait(1) script.Combatting.Value = false script.Parent.Tip.Touched:connect(function(onTouched) local humanoid = onTouched.Parent:FindFirstChild("Humanoid") if debounce == true then return end debounce = true if humanoid then humanoid:TakeDamage(3) debounce = false end end) end end)
I'm not sure if I used debounce correctly in this, because it still does WAY more than 3 damage when it touches an object with a humanoid.
| >๏๓คгเђєг๏< | Beginner Developer |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 20 Jan 2017 09:39 PM |
bump
| >๏๓คгเђєг๏< | Beginner Developer |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 20 Jan 2017 09:45 PM |
ahhhh
| >๏๓คгเђєг๏< | Beginner Developer |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 20 Jan 2017 09:54 PM |
ugh
| >๏๓คгเђєг๏< | Beginner Developer |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 09:55 PM |
if it does way more than 3 damage, then you are probably not using debounce properly, as you should wait after every touched event to whatever is being touched.
|
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 20 Jan 2017 09:58 PM |
Thanks, that worked.
| >๏๓คгเђєг๏< | Beginner Developer |
|
|
| Report Abuse |
|
|