Server script:
function onMouseClick()
local player = game.Players.LocalPlayer
player.PlayerGui.celMenu.Enabled = true
end
script.Parent.MouseClick:Connect(onMouseClick)
Error:
Workspace.Part.ClickDetector.Script:3: attempt to index nil with 'PlayerGui'
I want this GUI to be enabled when a player clicks a part but I get the error above whenever I click the part.
