Changing the players property like jumppower on keypress

how can i do that?

1 Like

You can detect a key beeing pressed with UserInputService KeyDown function. If you want the JumpPower beeing changed you need to change the “JumpPower” Value in Humanoid.

1 Like

but changing the humanoid jumpPower is on script while keypress is on local script

Use RemoteEvents, they are meant to be used in situations like these.

Then you need to use a RemoteEvent or a RemoteFunction to Fire/Invoke the Server. Then you can change the JumpPower in a script, like you want it.

2 Likes

what is the difference of remote event and remote function?

i’m sorry if i’m bothering new cause i’m new to lua but i have created 7 decent games

and i’m a solo developer i rely on youtube dev forum and toolbox

A RemoteEvent is just firing the Server if something should happen. But with a RemoteFunction you can give the Player kind of “feedback” on the result of what happened in the server.

2 Likes

Also if my reply from above solved your problem its appreciated to give out Solutions.

1 Like

look i tried but it says invoke server is not a member of remote event

Yeah right, InvokeServer is part of a RemoteFunction. FireServer is part of a RemoteEvent so you want to use this instead.

4 Likes

ok
thank you thank you thank you

If you change your own JumpPower locally, it should work fine. Your client is the one deciding how high you jump anyways.

3 Likes

this is the result of your help thankss

1 Like