I want to enable a ScreenGui I have in StarterGui by clicking on a part.
No errors in output, nothing happens when I click on the part.
Can someone please tell me what I am doing wrong?
-- LocalScript inside StarterPlayerScripts
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local gui = game.StarterGui.WeaponsGui -- path to WeaponsGui
mouse.Button1Down:Connect(function()
if mouse.Target and mouse.Target.Name == "GuiGiver" then
local clickDetector = mouse.Target:FindFirstChild("ClickDetector")
if clickDetector then
gui.Enabled = true
end
end
end)

5 comments
Change Enabled to Visable.
Changed it, still nothing happened
ScreenGui doesn't have a Visible property, Enabled was correct. However, click detectors are weird when dealing with client side stuff.
I'll change it back then
Reynaldo please check my answer