#Frame wont go visible

1 messages · Page 1 of 1 (latest)

full ridge
#

I have a script which is supposed to make a frame visible when clicked by the player, and im sure that the clickdetector script worked cuz it managed to Print text on click, but i cant get it to make that darn frame visible

script:
local ClickDetector = script.Parent
local ShipGUI = game.StarterGui.ScreenGui.ChooseSHip

ClickDetector.MouseClick:Connect(function(player)
ShipGUI.Visible = true
end)

formal tartan
#

StarterGui is the template players' GUI gets copied from, you have to use the specific player's PlayerGui
@full ridge

full ridge
#

Oh thank you ill try figuring it out

full ridge
#

Cant figure it out, skill issue on me

formal tartan
green ember
#

you are changing the ShipGUI from inside of the StarterGui

#

but

#

each player has a PlayerGui

#

StarterGui is in no player

#

replace game.StarterGui with something like game.Players.LocalPlayer.PlayerGui

full ridge
brisk karma
#

A quick fix is that you could put the script in the ShipGUI instead of the clickdetector

#

and then get the clickdetector by saying "game.Workspace.Part.Clickdetector"

#

That will definitely work