local player = game.Players.LocalPlayer
local character = player.Character
local Humanoid = character:WaitForChild("Humanoid")
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://4577006839"
local LoadedAnimation = Humanoid:LoadAnimation(Animation)
local Animation2 = Instance.new("Animation")
Animation2.AnimationId = "rbxassetid://4578997919"
local LoadedAnimation2 = Humanoid:LoadAnimation(Animation2)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, GPE)
if not GPE then
if input.KeyCode == Enum.KeyCode.Q then
if game.ReplicatedStorage.Value.Value == 0 then
script.Sound:Play()
LoadedAnimation:Play()
game.ReplicatedStorage.AttackVal.Value = 1 wait (1/4)
game.ReplicatedStorage.AttackVal.Value = 0
elseif game.ReplicatedStorage.Value.Value == 1 then
script.Sound:Play()
LoadedAnimation2:Play()
game.ReplicatedStorage.AttackVal.Value = 0
game.ReplicatedStorage.Value.Value = 0
end
end
end
end)
Basically i have a punch script but i dont know how to make it so that if it punchs someone it does damage can you help meh and also i tried to make this punch combo thing so that if u press the key simulatanously it will do a attack combo the combo works but i want help making it do dmg heres the script First Script: UP
2nd Script:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, GPE)
if not GPE then
if input.KeyCode == Enum.KeyCode.Q then wait (1/10)
game.ReplicatedStorage.Value.Value = game.ReplicatedStorage.Value.Value + 1 wait (1/4)
if game.ReplicatedStorage.AttackVal.Value == 0 then
game.ReplicatedStorage.Value.Value = 0
end
end
end
end)

2 comments
put your code in the question
K btw i managed to fix the animation i just need help with the script of punch