Jump Power Game, I need help with pets multiplying system

Hey guys i have recently started learning how to script, I was about to create fun game where you gain jump power every second, heres the script:

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character.Humanoid.UseJumpPower = true
		Character.Humanoid.JumpPower = 0
	end)
end)

while true do
	wait(1) -- This makes it be every second
	for _, player in pairs(game.Players:GetPlayers()) do
		if player.Character then
			player.Character.Humanoid.JumpPower += 1
	end
end

So, is there any way that i can add pets that will multiply player jump power he gains?
I already made pets, eggs hatching system etc. but i just need some help with the multiplier.
Is there any way that someone can help me?

1 Like

Are you doing this via Server Script?

Howdy :cowboy_hat_face:, you forgot to include an end after you adjusted the player’s new jump power. Here is the corrected version of your script.

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        Character.Humanoid.UseJumpPower = true
        Character.Humanoid.JumpPower = 0
    end)
end)

while true do
    wait(1) -- This makes it run every second
    for _, player in pairs(game.Players:GetPlayers()) do
        if player.Character then
            player.Character.Humanoid.JumpPower += 1
        end
    end
end

Sincerely,
ConstructedDamage

1 Like