I need to make a gui that becomes visible when someone touches a part. But for some reason, if one player touches the part, the gui becomes visible for everyone. There are no errors at all.
local player = game.Players.LocalPlayer
game.Workspace.Shop.HitBox.Touched:Connect(function()
if player.Character:FindFirstChild("Humanoid") and player then
script.Parent.ShopFrameSelectionShadow.Visible = true
script.Parent.ShopFrameSelection.Visible = true
end
end)

1 comment
You're forgetting one of the most important things! GUIs should always use a localscript I recommend you redo this whole thing under a localscript under StarterGui.