Setting frame.Visible to true isnt working

–beginner issue

right now i’m currently trying to make a shop frame that opens once you touch an object.
I can set the frame.visible property to false but i cant set it to true. I already tried looking through the forums and videos but i cant seem to find someone with the same issue. Also, if i set the visibility to not frame.visibility it works?

heres my only code:

    script.Parent.TouchArea.Touched:Connect(function(hit)
     	if hit.Parent:FindFirstChild("Humanoid") then
    		     local shopframe= game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.ScreenGui.Shop
    		    shopframe.Visible = true
      	end
    end)

P.S sorry if this was a simple fix that i was dumb enough not to realize

3 Likes

This is due to the fact that you are trying to change a Player’s Gui Properties on a server sided script. Instead try sending a remote signal to the Client asking them to change the visibility of their frame.

5 Likes

Could you check if shopframe is transparent?