Hello! So what I want is that when a player touches a trigger part in the workspace a shop gui pops up for them. I made the script in a local script and put it in starterplayerscripts. Yet the gui pops up for everyone on the server how can I fix this?
My guess is both scripts are detecting that the part was touched, and because the script doesn’t care about what client touched it, the gui shows up on every client’s screen. To fix this, you can just make the gui show up on hit’s playergui:
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
ShopToolGui.Parent = player.PlayerGui
I figured it out just like after I posted it lmao I couldn’t figure it out but then I was like what can I do? I decided to use the players name and to check it with an if statement if the players name matched up with who touched it and to show it only to that players name and it actually worked! But thank you anyways!