Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I improve this punch script?

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.

2 comments

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..

0

k

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.