When touching part why isnt frame opening?

2 Likes

I believe that you can’t open guis in a server sided script. You have to call a remote event and create a client script to make the gui visible.

1 Like

IT worked before when i tried to do in when touching a baseplate

1 Like

Still want to call a remote event or else it will make the gui visible for everyone unless that’s what you’re going for

1 Like

The player might not be an actual player and just a normal part, add a simple check if it is a player:

ShopOpen.Touched:Connect(function(Ontouch)
local Player = game.Players:GetPlayerFromCharacter(Ontouch.Parent)
if Player then
Player.PlayerGui.ScreenGui.Frame.Visible = true
end
end)

It’s PlayerGui not workspace or anything else

1 Like

I see that now. I agree, he should have 2 if statements.

2 Likes

PlayerGui is not replicated, so the server can’t see it. You need a local script to do this.

1 Like