I have a script that when you hold “g” you go up to the chest and grab items from a GUI but when you close the chest everything works except letting the player move afterwards. Is there any way to fix this?
More of the script please. Not enough to tell what is happening.
In the else
statement the players WalkSpeed
and JumpPower
are set to 0
.
I don’t see anywhere in that section, or anywhere else, that they are being returned to normal.
Is there someplace lower down that they are returned to normal?
yes byt in the top one it sets the walkspeed back to 16
The else
section executes if the v.Open.Value
is not there or true.
Functions don’t execute from bottom to top. They execute top to bottom.
If you want the values changed back you need to change them later on inside the else
statement.
There may already be a place in the script that is doing the change. Look further down.
Is the ProximityPrompt being triggered a second time? Does the other code around it work?
If the function runs again, it doesn’t matter where it’s at. His code is fine in that regard.
yes, its triggered twice. Open and close