Here's my script.
local clickDetector = script.Parent local brickClickedEvent = game.ReplicatedStorage.Events.BrickClicked clickDetector.MouseClick:Connect(function(player) brickClickedEvent:FireClient(player) print(player.Name.. "has clicked the brick") game.StarterGui.TableFinder.Enabled = true end end)
the GUI won't appear help?
everything is in the correct place.
You are using the wrong location to find the gui element, try this:
local clickDetector = script.Parent local brickClickedEvent = game.ReplicatedStorage.Events.BrickClicked local player = game.Players.LocalPlayer clickDetector.MouseClick:Connect(function(player) if not false then brickClickedEvent:FireClient(player) print(player.Name.. "has clicked the brick") player.PlayerGui.TableFinder.Enabled = true end end)
Also, a more simple way to do it is to make the gui's visibility false. If you do that way, use this:
local clickDetector = script.Parent local brickClickedEvent = game.ReplicatedStorage.Events.BrickClicked local player = game.Players.LocalPlayer clickDetector.MouseClick:Connect(function(player) if not false then brickClickedEvent:FireClient(player) print(player.Name.. "has clicked the brick") player.PlayerGui.TableFinder.Visible= true end end)
instead of changing screen gui, use a localscript in startergui which on an event changes game.Players.LocalPlayer.PlayerGui.YourGui to enabled/disabled