Your supposed to click on a Dummy's torso and it give you a shop GUI. This LocalScript inside the Dummy Torso. The Dummy is in the workspace.
Player = game.Players.LocalPlayer script.Parent.ClickDetector.mouseClick:connect(function() local Shop = game.ServerStorage.Shop:Clone() Shop.Parent = Player.PlayerGui end end)
1) "LocalPlayer" can only be accessed from LocalScripts. Switching the script to a LocalScript won't work, if this script is a decendent of workspace.
2) mouseClick is not a property of ClickDetector. Remember, everything in scripting is case sensitive. Use MouseClick
3) There's an unnecessary end in line 6
4) :connect is deprecated. It's highly recommended you use :Connect.
Now, we have to solve a problem on how to get the player who clicked. MouseClick is an event that, when fired, will send a parameter that will contain the player who clicked.
script.Parent.ClickDetector.MouseClick:Connect(function(PlayerWhoClicked) local Shop = game.ServerStorage.Shop:Clone() Shop.Parent = PlayerWhoClicked.PlayerGui end)
PRO TIP: Output will help you find errors in your code. Leave it open.
local Player = game.Players.LocalPlayer -- mouseClick needs to exactly spelt as MouseClick, because it's a special method -- :connect should also be :Connect, because :connect is deprecated (aka do not use) script.Parent.ClickDetector.MouseClick:Connect(function() local Shop = game.ServerStorage.Shop:Clone() Shop.Parent = Player.PlayerGui end)