✓ Accepted answer
###LocalScripts cannot run in Workspace. They can only run in PlayerGui, Backpack, PlayerScripts, Character, and ReplicatedFirst. You'll need a RemoteEvent to make the Gui show.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ShowGui = ReplicatedStorage:WaitForChild("ShowGui")
script.Parent.ClickDetector.MouseClick:Connect(function(player)
ShowGui:FireClient(player)
end)
###Local code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ShowGui = ReplicatedStorage:WaitForChild("ShowGui")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")
local casegui = PlayerGui.ScreenGui.ScrollingFrame
ShowGui.OnClientEvent:Connect(function()
casegui.Visible = true
end)
1 comment
Thanks! It worked :D