game.StarterGui.Menu.MainMenu.Credits.MouseButton1Click:Connect(function() game.StarterGui.Menu.MainMenu.CreditsFrame.Visible = true end)
I honestly don't know whats wrong with the script?!?!
game.StarterGui.Menu.MainMenu.Credits.MouseButton1Click:Connect(function() game.StarterGui.Menu.MainMenu.CreditsFrame.Visible = true end)
I honestly don't know whats wrong with the script?!?!
well here is a thing is thing is, all GUIs that are in the StarterGui are cloned into the an individual players PlayerGui. Therefore, to access a gui you'd have to do player.PlayerGui..
so you could rewrite your code like this in a localscript:
local Player = game.Players.LocalPlayer
player.PlayerGui.Menu.MainMenu.Credits.MouseButton1Click:Connect(function() player.PlayerGui.Menu.MainMenu.CreditsFrame.Visible = true end)
or you could just parent the localscript to the Gui and use script.Parent
thank you
accept the answerr
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
accept the answerr