Shift to make player "run" (move faster)

I have an fps script and would like a different script to be created so that when the user (player) holds the shift key, the player moves at an increased pace, therefore the name “run”. Does anyone have the capabilities/time to make this from scratch, or does this exist already?

Hi @Imarri! This depend on the current script you’re using. Below a basic example.

// update function
if ( {
    this.speed = 2;
else {
    this.speed = 1;

Okay, so i need this script to be on a different basis of the fps script, as I am using it for the same player, just in a different way.

I can share my fps script if you really need me to do so.

Can you explain why it has to be in another script? Perhaps you could share a link of your project so I can see if I can share an example that better fits your case.

1 Like


This is my previous yet still online, and functioning account.
Without further ado here is the scene PlayCanvas | HTML5 Game Engine

I recommend using only one account, as it can be confusing for conversations if you use multiple accounts.

Sorry, I don’t understand this, so I can’t give any further advice.