Hello, i gotten a problem with my code here, so i tried to Nerf Eletric Ball with a code
script.Parent.Touched:Connect(function(hit)
if script.Parent.Velocity.Magnitude >= 120 then
if hit.Parent:FindFirstChildOfClass("Humanoid") then
if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
if hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand == false then
hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
hit.Parent:FindFirstChildOfClass("Humanoid").Health = hit.Parent:FindFirstChildOfClass("Humanoid").Health - script.Parent.Velocity.Magnitude/75000000000
end
script.Parent.HitWhileSpeeding:Play()
script.Parent.HardImpactSpeeding:Play()
script.Parent.ShockHealth.Value -= math.floor(script.Parent.Velocity.Magnitude/25)
script.Parent.Combo:Fire()
local explosion = Instance.new("Explosion")
explosion.Position = hit.Position
explosion.BlastRadius = 0
explosion.BlastPressure = 0
explosion.ExplosionType = Enum.ExplosionType.NoCraters
explosion.Parent = workspace
wait(3)
hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
end
elseif script.Parent.Velocity.Magnitude >= 40 then
if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
hit.Parent:FindFirstChildOfClass("Humanoid").Health = math.floor(script.Parent.Velocity.Magnitude/200)
end
end
end
end)
but for Some Reason it just instant Killed King Drooling Zombie
for example:
the Health Bar Disappeared means King Drooling Zombie Died
any solutions to fix intsant-kill issues for My Eletric ball? let me know.