So basically, LogiaNumber is like a activation, if it's 0 then you don't get the effect, but if it's 1 then you do get the effect, when other players try to touch you they get damage, but it's not working?
local player = game.Players.LocalPlayer local Character = player.Character if player.Leaderstats.LogiaNumber == 1 then if Character:FindFirstChild('Right Arm').Touched:connect(function(otherpart) elseif Character:FindFirstChild('Left Arm').Touched:connect(function(otherpart) end) then otherpart.Parent:FindFirstChild('Humanoid').Health = -3 end end
local player = game.Players.LocalPlayer local Character = player.Character function hurt(otherpart) otherpart.Parent:FindFirstChild('Humanoid').Health = otherpart.Parent:FindFirstChild('Humanoid').Health - 3 end if player.leaderstats.LogiaNumber == 1 then Character:FindFirstChild('Right Arm').Touched:connect(function(otherpart) hurt(otherpart) end) Character:FindFirstChild('Left Arm').Touched:connect(function(otherpart) hurt(otherpart) end) end
The code that was provided by 1234 caused the unexpected symbol error because you can't use an if statement on an connection. Remove the if, then, elseif, and the second to last end. Then add the ends to the functions. You also need to pass the otherpart variable through the hurt function otherwise it will give an nil variable error. And to remove 3 health from the otherpart you need to subtract the health by 3.
If this helped please rate up and set this as the answer.
Does your leaderboard work? Because I think leaderstats is meant to have a lower case "L"? I also cleared it up a bit...
local player = game.Players.LocalPlayer local Character = player.Character function hurt() otherpart.Parent:FindFirstChild('Humanoid').Health = -3 end if player.leaderstats.LogiaNumber == 1 then if Character:FindFirstChild('Right Arm').Touched:connect(function(otherpart) then hurt() elseif Character:FindFirstChild('Left Arm').Touched:connect(function(otherpart) hurt() end) end end