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

My GUI script to open a scrolling frame is not working?

Asked by 2 years ago
Edited by Xapelize 2 years ago

I have tired many times and made sure that all of the gui names are correct but it still does not work, please let me know what is wrong.

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    player.PlayerGui.Shop.ScrollingFrame.Visible = true


end)
0
Any errors? AProgrammR 398 — 2y
0
The only error I can think of is that you are doing this from a server script. Are you sure you are doing this inside of a local script? ISkyLordDoge 37 — 2y

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
2 years ago
Edited 2 years ago

Use player:WaitForChild("PlayerGui") not player.PlayerGui in line 4 because PlayerGui inside player loads kinda slow

2
this is funny because hes using an event so by the time he clicks that button, it should be able to have loaded the PlayerGui greatneil80 2647 — 2y
0
god lol Xapelize 2658 — 2y
0
Lol ISkyLordDoge 37 — 2y
Ad

Answer this question