I've got a shop npc. When you click on their head, it clones a shop gui into the PlayerGui, but when I click exit shop it wont destroy its self.
When I use a LocalScript, it destroys it, but the game wont put the Gui back because the server still thinks that the gui is in the player's PlayerGui.
When I use a Server-Sided script, it just flat out wont work. I assume that's because the server cant access the PlayerGui?
Here is the script that controls the shop closing:
function rek()
script.Parent.Parent.Parent:Destroy()
end
script.Parent.MouseButton1Click:Connect(rek)

2 comments
where is this script located?
It is located in the exit button