Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help with adding int values from leaderstats to sword damage?

Asked by 2 years ago

for some reason local p =game.Players:GetPlayerFromCharacter(Tool.Parent)
dmg = p.leaderstats.Damage.Value

doesn't work and when it prints its value, its 0. help anyone????

Tool.Activated:Connect(function() if Debounce == false then Debounce = true local p =game.Players:GetPlayerFromCharacter(Tool.Parent) dmg = p.leaderstats.Damage.Value print(p.leaderstats.Damage.Value) local Humanoid = Tool.Parent:WaitForChild("Humanoid") local AnimTrack = Humanoid:LoadAnimation(Slash)

        AnimTrack:Play()
        wait(.3)
        sound:Play()
        wait(0.4)
        Debounce = false
end

end)

0
What do you mean it doesn't work? If it's returning 0, surely it must be retrieving the value correctly? DevNetx 250 — 2y

Answer this question