Script not changing stringvalue

Im creating a deployment gui which has the player moved into storage as soon as they load in and would then deploy into the game when pressing a button, everything works except the value which determines if the player is spawned in doesnt change when the button is pressed, theirs no error in the output log so im unsure as to why

This is script 1 which seems to work fine
image

This is script 2 where the problem is (changing the value of “deployed”)

And this is how it is set out
image
Deployed.Value = “Yes” doesnt seem to work as when checking through the server it still says “No” (what its default set to) even after pressing the button

Any help is appreciated

I never used Server-Sided scripts in a GUI that’s only shown LOCALLY to the player/client.
Maybe try setting up a Remote Event see if that allows the server to see the value.

2 Likes

Do you have any errors in console?

True I thought the set up was a bit weird (its basis is from another devforum post from a while back) I think its probably best to set it up as a serverscript

For handling a player’s UI you should use local scripts, if something needs to replicate to the server then you can use a RemoteEvent/RemoteFunction instance.

Messed around with this and it works perfectly, thanks