Any idea why this doesn't work?

haven’t scripted in ages not sure why this doesn’t work, any idea?


trying to simply make a button press open a gui

Try modifying
game.StarterGui.CoinShop.yescoins.Visible = true
to
script.Parent.Parent.Parent.Parent.CoinShop.yescoins.Visible = true

Not sure, but let me know what happens!

1 Like

this did indeed work, thank you very much!

1 Like

It is becouse of that, StarterGui is no more child of player when you run the game.
When you join as player, all GUIs from StarterGui move to new special player folder called “PlayerGui”.

So i would change it to:

game.Players.LocalPlayer.PlayerGui.CoinShop.yescoins.Visible = true

or would use Parents:

script.Parent.Parent.Parent.Parent.CoinShop.yescoins.Visible = true