script.Parent.Touched:Connect(function(HIT) local player = game.Players:GetPlayerFromCharacter(HIT.Parent) if player == game.Players.LocalPlayer then player.PlayerGui.ScreenGui.Shop.Visible = true end end) script.Parent.TouchEnded:Connect(function(HIT) local player = game.Players:GetPlayerFromCharacter(HIT.Parent) if player == game.Players.LocalPlayer then player.PlayerGui.ScreenGui.Shop.Visible = false end end)
This is in a local script in a brick.
What is wrong here?
Never use local scripts in parts. Even when It comes to touch events. Use a Server Script (Regular Script) instead.