Right so basically I'm making this script where you click on an NPC's torso and it opens a shop GUI, although printing no error it doesnt work. (Im 70% sure its because i dont know how to use PlayerGUI properly)
EDIT: the script is also in the torso of the NPC if that helps
local ClickDetector = game.Workspace.PassportSeller.Torso.ClickDetector PlayerGUI = game.Players.LocalPlayer.PlayerGui ShopGUI = PlayerGUI:WaitForChild("Frame"):WaitForChild("CloseButton")PlayerGUI:WaitForChild("Frame"):WaitForChild("TextLabel") ClickDetector.MouseClick:Connect(function() PlayerGUI.ShopGUI.Visible = true end)