In my game when you touch a part it opens the gui but when you step on the part it opens on all players screens in the server.Help me.
Heres my script:
game.Workspace.ShopBuilding2.ShopPart.Touched:Connect(function(hit) if hit then script.Parent.Shop.Frame.Visible = true end end)
Put the script and the ScreenGui on the part, then put this on the script:
script.Parent.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) script.Parent.Gui:Clone().Parent = player.PlayerGui end)
Accept the answer if it worked!