So I'm working on a game that uses ClickDetect on a part to open my shop. It works perfectly in play solo, but as soon as I publish it and play it online the shop Gui won't open.
Here is the script:
script.Parent.MouseClick:connect(function(playerWhoClicked)
if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Shop") == nil then
game.StarterGui.Shop:Clone().Parent = game.Players.LocalPlayer.PlayerGui
end
game.Players.LocalPlayer.PlayerGui.Shop.Background.Visible = true
end)

2 comments
Is the local script in Workspace? That would be the problem.
Yeah. Where would I need to put it for it to work?