Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I improve this punch script?

Asked by 7 years ago
Edited 7 years ago
wait(2)

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
Anim = script.Animation

Mouse.KeyDown:connect(function(key)
if key == "e" then
s = player.Character.Humanoid:LoadAnimation(Anim)
s:Play()
end
end)

I want to make it so that: -it does damage -there is sound -it doesn't inturrupt the walking animation.

0
A big improvement would be to put your code in Lua! Click the blue Lua button and put your code between the ~~~ - Makes it much easier to read.. Rand0m3r 45 — 7y
0
k Thisnoguest 27 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

You should use Cframing not an animation. Cframing also improves Damage so it doesn't hit the player 1000 times over.

Ad

Answer this question