Scripting a gamepass to change a time interval

I’m currently trying to create a game in which your character changes size every second. I have the basis of the game set and am currently attempting to use a gamepass to change a time interval.


As seen in this image I am trying to change the 11th line, “wait(1)”

Since I want the gamepass to double the characters gain I know that I need this value to be changed to 0.5. How could I check if the player has said gamepass and how would I change the value from 1 to 0.5?

I’m new to lua and am not fully familiar with the scripting language. I appreciate any and all help to my question, Thanks!

2 Likes

Make a variable called “time” and make it equals to 1.
use wait(time)

in the script when you detect the gamepass, just set time to 0.5

2 Likes

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