Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The script wont work but theres no problems in the output?!?!?

Asked by 4 years ago

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?!?!

0
accept the answerr User#23252 26 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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

0
thank you JAX_AtRB -1 — 4y
0
accept the answerr User#23252 26 — 4y
Ad

Answer this question