I've tried practically everything to fix this, but I can't seem to get it working. I want to have a book-style GUI (done via RoDocker) become visible for the player who clicked on a model in my game. However, while the ClickDetector works, the scripts don't seem to and the GUI never becomes visible.
I'm doing this via a RemoteEvent. I want the ClickDetector to fire the RemoteEvent so the Client side knows to make the GUI visible. I've tried more than just this method, but nothing seems to be working. My question is a lot similar to this one from 2020 on the Dev Forum, but it was never solved and I really don't want to make the book a tool.
I'm autistic and rather new to Lua (with some knowledge in other languages), so please be patient with me. I'll need a lot of help.
Here are the placements of my scripts:
https://i.imgur.com/vW27kLe.png (My ClickDetector in its parent model, with its script to tell the RemoteEvent to fire)
https://i.imgur.com/qwJ09Bz.png (My RemoteEvent in ReplicatedStorage)
https://i.imgur.com/SoFMCzS.png (My script to tell the GUI to become visible "MakeVisible" in the GUI I want to make visible, note how RoDocker handles book GUIs via placing multiple frames into one ScreenGui)
My scripts so far are below. I've changed these so many times to try to get these to work, so they may look wonky from all the things I ended up trying.
Script telling RemoteEvent to fire (DinosaurBookOpen):
local clickDetector = workspace.DinosaurClickDetector
local remoteEvent = ReplicatedStorage:WaitForChild("DinosaurBook")
local function onClicked(player)
remoteEvent:FireClient(player)
end
-- Connect the function to the MouseClick event
clickDetector.MouseClick:Connect(onClicked)
Script receiving RemoteEvent and telling GUI to becoming visible (MakeVisible):
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("DinosaurBook")
local function onNotifyPlayer()
script.Parent.Visible == true
end)
remoteEvent.OnClientEvent:Connect(onNotifyPlayer)

3 comments
You forgot to state something, but let me say it here: Put the script into Workspace or ServerScriptService, put LocalScript into StarterPlayerScripts or StarterGui (StarterPlayerScripts clones when the player is spawned, StarterGui replicate into player when player is spawned, so StarterPlayerScripts are definitely your choice if you want your script to make it fast!)
I though they already had all the scripts placed where they wanted them
This caught it, thank you! However, with this remedied, it seems I've come across a completely different bug... I'll post on that below.