I've made a billboard gui with a textbutton. When clicked. it's supposed to allow a screen gui to appear, however this doesn't happen. I even tested with something else. I wrote a script for it to print "Good" when clicked, and that worked, but when I transfer back to my script for the screen gui it doesn't do anything. Honestly this should be so simple to script but apparently it's not.
function onClick() game.StarterGui.ScreenGui.Infos.Sun.Visible = true end script.Parent.MouseButton1Click:Connect(onClick)
The reason is a Players Gui is in the player as game.Players.LocalPlayer.PlayerGui not Screen Gui Here is the fixed script, and make sure its a local script as LocalPlayer is only for local scripts
function onClick() 2 game.Players.LocalPlayer.PlayerGui.ScreenGui.Infos.Sun.Visible = true 3 end 4 5 script.Parent.MouseButton1Click:Connect(onClick)
Use this script instead as your current script has a few errors with the function.
script.Parent.MouseButton1Click:Connect(function() game.StarterGui.ScreenGui.Infos.Sun.Visible = true end
If any errors please let me know.