when I touch the part it says shop isn't a valid member of playergui
script.Parent.Touch.Touched:connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.Shop.Shop.Visible = true
end
end)
and when i try this it only comes up with FreeCamera
for i,v in pairs(game.Players.6LB0.PlayerGui:GetChildren()) do
print(v.Name)
end
The script should work, unless the hierarchy is wrong. So reply back with a picture of all the items in the 'Explorer' tab.
script.Parent.Touch.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.Shop.Shop.Visible = true end end)