I’ve tried doing :WaitForChild() but that gives me the infinite yield possible error.
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local RepStorage = game:GetService("ReplicatedStorage")
local PunchRemote = RepStorage.Punch
local db = true
local Damaged = false
local UIS = game:GetService("UserInputService")
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://05010685080"
Character["Right Arm"].Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and not db and not Damaged and hit.Parent.Humanoid ~= Player.Character.Humanoid then
if Character.Humanoid.Health > 0 then
Damaged = true
PunchRemote:FireServer(hit.Parent.Humanoid)
end
end
end)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E and db then
db = false
local Anim1 = Character:WaitForChild("Humanoid"):LoadAnimation(Animation)
Anim1:Play()
wait(0.8)
Damaged = false
db = false
end
end)
Damn, and to see that your actually still in the forum, I am literally only on my first month but I really like this forum. I did not mean that you were inexperienced but more for just documentation purposes if other people search it up on google