Basically I want to make an m1 system. However, the damage only works for the first player who joins the server. Whenevrr anybody else joins they will just have 0 damage m1s.
RightHand.Touched:Connect(function(hit)
local ch = hit.Parent
local humanoid = ch:FindFirstChildWhichIsA('Humanoid')
local combat = char:FindFirstChild('Boxing')
local DmgReduction = client:GetAttribute('Reduction')
local m1cd = client:GetAttribute('M1DEBOUNCE')
local gottenPlayer = Players:GetPlayerFromCharacter(hit.Parent)
if DmgReduction < 2 then
if combat and DmgReduction and humanoid and ch then
if m1cd then
HandleInput:FireClient(client, 'M1Count')
client:SetAttribute('M1DEBOUNCE', false)
if gottenPlayer then
local dmgReduction = gottenPlayer:GetAttribute('Reduction')
if DmgReduction < 2 then
if dmgReduction > 0 then
humanoid:TakeDamage(M1Damage / dmgReduction)
else
humanoid:TakeDamage(M1Damage)
end
end
else
humanoid:TakeDamage(M1Damage)
end
task.wait(M1Cooldown)
client:SetAttribute('M1DEBOUNCE', true)
end
end
end
end)
There are zero errors everything is defined etc etc