I need help with a "Jump Power +1 Every Second" Script

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

while task.wait(1) do
	
	for _, player in pairs(game.Players:GetPlayers() do <------
		if player.Character	then
				--Any code if character exists
				player.Character.Humanoid.JumpPower += 1
		end
	end
	
end

Hi! So, I know the “do” is wrong, but what do I put instead? I’m sorry if this is “dumb” but I’m new to scripting and I just followed a tutorial! :sweat_smile:

You’re missing brackets (parenthesis) at the end of your for loop.

Edited code:

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

while task.wait(1) do
	
	for _, player in pairs(game.Players:GetPlayers()) do <------
		if player.Character	then
				--Any code if character exists
				player.Character.Humanoid.JumpPower += 1
		end
	end
	
end

Thank you so much for your help! It works now!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.