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

Fixing jump detector for giving coins?

Asked by 4 years ago
Edited 4 years ago

Hi!

I don't really know why this doesn't work. Could someone help me?

EDIT: It acutally only gives coins on some jumps.

game:GetService("Players").PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character.Humanoid.Jumping:Connect(function()
            player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1
        end)
    end)
end

Answer this question