TouchPart gui opening for everyone

So, when someone touch the “TouchPart” the shop GUI opens for everyone, I already tried to fix that using a RemoteEvent but this problem still happens

The TouchPart script
image
image

My try to fix it:
image
image
image


image

EDIT: No, it’s not the wrong “ShopPart” number, I already fixed that and the error still happens

hmm i think i am wrong but i dont know but u put it as FireClient which will fire only for local player u need to put it as FireServer so that it fire the entire server

Make a remote event. Use fireclient. RemoteEvent | Documentation - Roblox Creator Hub

Bruh, have you looked at all the photos, there’s a fireclient in one of the scripts…

You don’t need a Remote for showing a GUI on touching a part.

You simply need to make your localscript (TixCity) check if the hit is the local player only. Currently you had it check if any part touched it, thus if any player was touching it, everyone would open it because some part is touching it.

local player = game:GetService("Players").LocalPlayer
game.Workspace.ShopPart5.Touched:Connect(function(hit)
if hit and hit.Parent.Name == player.Name then
--Show gui here
end
end)

Just make sure you add in your debounces and you are good to go.

1 Like

To be honest, you attempt to fix it should actually work “tested it in studio”.
Maybe you just forgot to disable the “bad” script(I mean the TixCity Script)


Or if you want to do it locally that should work too:

The first screenshot is basically saying that if the part is touched it will make it visible, it hasn’t got a specific player. If you’re trying to do it locally you could just do

if hit and hit.Parent.Name == game.Players.LocalPlayer.Name then

2 Likes

Maybe make the gui visible using PlayerGui.