my Close button wont work and i dont understand why here’s my script
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
player.PlayerGui.ToolShop.Frame.Visable = false
end)
my Close button wont work and i dont understand why here’s my script
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
player.PlayerGui.ToolShop.Frame.Visable = false
end)
its a typo, Visible
not Visable
Also in a local script in a gui you do not need playergui just do:
script.Parent.Visible = --value -- Add More parents considering your area
o simple mistake thank you so much !
my script is still not working
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
player.PlayerGui.ToolShop.Frame.Visible = false
end)
where did you put the local script
umm my brain because online wont work for me
no I meant what is it parented to
Does it say anything in the output? That would be helpful
Is the button you are trying to close a TextButton not a TextLabel?
let me check inside ToolShop so I can fix it
My LocalScript:
Is it a local script? If not, then it has to be one.
Is it in the text button? Or is it a normal script. Maybe you can check the output.
can i have a look of the property and explorer section
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
repeat wait()
player.PlayerGui.ToolShop.Frame.Visible = false
until player.PlayerGui.ToolShop.Frame.Visible == false
end)
The reason this doesn’t work is because the frame that you’re turning invisible doesn’t contain the textbutton under it. Make the TextButton a child of the frame.
I did not notice that, you speak the truth!
Try making an RemoteEvent that will fire in the local script after click and server script that will listen to event will sclose the gui.
The frame would only need to be closed on the client. I dont think you can modify a players gui using server scripts outside of PlayerGui.
Mithrandir is right most likely…