So I made it so that if you click on a text button, that is parented to a surface gui, which is on a part, will make the frame of a tool shop gui visible. The problem is when I click on the button, it doesn’t do anything. Here is the script:
script.Parent.MouseButton1Click:Connect(function(player)
player.PlayerGui.ToolShop.Frame.Visible = true
end)
Is there anything wrong?
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:51pm
#2
tell us the error in output
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:52pm
#3
Also assuming this is in starterGUI, you dont need to do
player.PlayerGui.ToolShop.Frame.Visible = true
you can just use script.Parent and so on
It doesn’t show an error in output. That’s why I haven’t been able to debug it.
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:53pm
#5
Is this a screengui, suurfacegui or what
The surface gui is parented to a part in workspace.
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:54pm
#7
is this a local or normal scipt
Local, oof I forgot to put alot of details.
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:55pm
#9
you cant have local scritps in worksapce, change to normal
phamosaur
(alex)
November 19, 2020, 6:55pm
#10
If it’s a surface GUI that’s parented to a part in the workspace, then the GUI isn’t going to be in the player’s playergui.
1 Like
This surface gui, has a text button, that when It’s clicked, will look for another different gui, which is located in the players PlayerGui, and it will find it and turn the frame visible.
gimme a sec. Gonna test it. changed it to a server.
@KingJoseon @alxzile still doesnt work.
nope. No typing errors or anything. Doesnt show anything in output either as I said earlier.
1 Like
KingJoseon
(ILikeBigBananas)
November 19, 2020, 6:59pm
#16
can you show us your player with all the screengui open? in explorer
KingJoseon
(ILikeBigBananas)
November 19, 2020, 7:04pm
#19
The script should work, have you tried doing:
script.Parent.MouseButton1Click:Connect(function(player)
local PlayerGui = player:WaitForChild("PlayerGui")
PlayerGui.ToolShop.Frame.Visible = true
end)
also are you sure the frame is actually called Frame?
Yes I’m sure the frame is called Frame. Gimme a sec to try the new code.