So here is the local script of where you get power..
wait(4) while wait(.5) do if game.Players.LocalPlayer.Character.Humanoid.JumpPower.Magnitude >0 then workspace.Events.AddJump:FireServer() end end
So I understand if I put "MoveDirection" where it says "JumpPower" it will add power when I take steps.. but what would I put if I wanted it to add points when you jump?
Just use Humanoid.Jumping
humanoid.Jumping:Connect(function(active) if not active then return end -- If they aren't jumping, stop the function here print('Player is jumping') -- Award points end)
More info on HumanioidStates
Or to use your code explicitly
wait(4) game.Players.LocalPlayer.Character.Humanoid.Jumping:Connect(function(active) if not active then return end workspace.Events.AddJump:FireServer() end)
Just a note, I wouldn't store RemoteEvents or RemoteFunctions in Workspace
Your question actually need more explanation. But I guess you are trying to add point when the player jumps (Spacebar pressed).
I actually have 2 methods.
1 ) Use UserInputService to detect the 'Spacebar' being pressed , and give the player points. - But this will also increase the Player's point even if you pressed spacebar rapidly , but I sure you can add debounce.
2) Use HumanoidStateType. It been awhile since I use this 'function' , but I'm sure you can detect whether the Player is 'Falling' , 'Jumping' , etc.