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

Please may have help with this script that's supposed to give points to the player every jump?

Asked by 5 years ago

Hello, Please may I have some help with the script I am making? It is meant to give points to a player every time he/she jumps. Any help would be appreciated.

Here is the code:

local player = game.Players.LocalPlayer
local character = script.Parent
local humanoid = character:FindFirstChild("Humanoid")
function addPoints(points)
    player:WaitForChild("leaderstats"):WaitForChild("Jump Power").Value = player:WaitForChild("leaderstats"):WaitForChild("Jump Power").Value + points
end
humanoid.Jumping:Connect(function(isActive)
    addPoints(0.1, isActive)
end)

There is no console output.

0
make 0.1 to 100.9801.1 = 0.1 Sartaz110 -17 — 5y
0
Remove the "isActive" argument to addPoints(). DeceptiveCaster 3761 — 5y
0
ok ProvingTrottle 27 — 5y

Answer this question