I've already asked this question previously- and yes, I've received answers, but they didn't help me. If I don't receive answers on this question, I won't bother to ask again. Basically, this is a local script inside of a text button GUI. I'm trying to make the text button make another frame visible with a function and click event, but it doesn't work.
I would be incredibly thankful if someone could help me!
I'm not asking for a simplification because that will not help me, I'm looking for a correction to this script. I'm fairly new to scripting, so please don't judge me for getting a script this easy wrong.
DETAILS: Screen GUIs are used Frame is used Text Button is used Local Script is used
SCRIPT:
smitts = game.StarterGui.ScreenGui2.Framel function smiths() smitts.Visible = true end end script.Parent.MouseButton1Click:connect(smiths)
I've even tried making the script more complicated..
Don't use StarterGui - it's used for holding guis that will be replicated to each clients' PlayerGui. What the client sees on their screen are descendants of their PlayerGui.
Here's a simple fix:
wait() local pgui = game.Players.LocalPlayer.PlayerGui local smitts = pgui.ScreenGui2.Frame1 function smiths() smitts.Visible = true end script.Parent.MouseButton1Down:Connect(smiths)