I have these fists tools that were working fine, but now arn’t and from the looks of things, should work, but don’t, this is the local script inside the tool. There is also a server script inside that local, any help? Heres the localscript.
local tool= script.Parent local plr= game.Players.LocalPlayer repeat wait() until plr.Character local char= plr.Character local hum= char:WaitForChild("Humanoid") local anim1= hum:LoadAnimation(script.Punch1) local anim2= hum:LoadAnimation(script.Punch2) local pE = script.punched local on= false local deb= false local b1d local mouse= plr:GetMouse() local cooldown= .8 local rh= char:WaitForChild("RightHand") local lh= char:WaitForChild("LeftHand") local rht local lht local ud= game.ReplicatedStorage.updateStrength local idle= hum:LoadAnimation(script.Idle) local dmg local durab local throw= Instance.new("Sound",plr.Character.LowerTorso) throw.SoundId="rbxassetid://711753382" ud.OnClientEvent:Connect(function(p, dur, str, jelly, jaguar) dmg= dur durab= p end) tool.Equipped:Connect(function() if hum.Health <= 0 then return end idle:Play() b1d= mouse.Button1Down:Connect(function() if hum.Health <= 0 then return end if deb == false then deb= true if on == false then on = true anim1:Play() throw.Pitch= math.random(1,2) throw:Play() local mydeb= false rht= rh.Touched:Connect(function(hit) if hum.Health <= 0 then return end if mydeb == false then mydeb=true if hit.Parent:FindFirstChild("Humanoid") then pE:InvokeServer(hit.Parent.Humanoid,dmg, hit) end if hit.Parent.Parent:FindFirstChild("Humanoid") then pE:InvokeServer(hit.Parent.Parent.Humanoid,dmg,hit) end end end) elseif on == true then on = false anim2:Play() throw.Pitch= math.random(1,2) throw:Play() local mydeb= false lht= lh.Touched:Connect(function(hit) if hum.Health <= 0 then return end if mydeb == false then mydeb=true if hit.Parent:FindFirstChild("Humanoid") then pE:InvokeServer(hit.Parent.Humanoid,dmg,hit) end if hit.Parent.Parent:FindFirstChild("Humanoid") then local hum= hit.Parent.Parent:FindFirstChild("Humanoid") pE:InvokeServer(hum,dmg, hit) end end end) end wait(cooldown) if lht then lht:disconnect() end if rht then rht:disconnect() end anim1:Stop() anim2:Stop() deb=false end end) end) tool.Unequipped:Connect(function() b1d:disconnect() if rht then rht:disconnect() end if lht then lht:disconnect() end idle:Stop() end)
heres the server
local func= script.Parent.punched func.OnServerInvoke = function(plr, hum, dmg, tor) local sound= Instance.new("Sound") sound.SoundId= "rbxassetid://137579113" game.Debris:AddItem(sound,5) sound.Parent=tor sound:Play() hum:TakeDamage(dmg) end