Hello, this is a follow up to my earlier question, I've edited the script and been playing around with it all day but still something's wrong. If anyone well versed in filtering enabled could help I would be grateful. This script is for a GUI open/close button that works with Filtering Enabled on. This script is in a local script, it's parent is the textbox acting as the Open/Close button.
local TextBox = game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").CloseTab
TextBox.MouseButton1Down:connect(function()
game.Workspace.OpenCloseEvent:FreServer()
end)
This is the ServerScript located in ServerScriptStorage, it creates and describes the remote event.
local event = Instance.new("RemoteEvent")
event.Name = "OpenCloseEvent"
event.Parent = game.Workspace
event.OnServerEvent:connect(function()
local TextBox = game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").CloseTab
if TextBox.Text == "Open" then
game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").PositioningFrame.Visible = true
print('1')
game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").CloseTab.Text = 'Close'
else
game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").PositioningFrame.Visible = false
print('2')
game.Players.PlayerName.PlayerGui:WaitForChild("Customizer").CloseTab.Text = 'Open'
end
end)
Many thanks to anyone that can assist me

1 comment
Thankyou so much! This is helpful and I'll try it out when I have some time, I'll get back to you if it works.