Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Startergui isn't working for me? it says it isnt a valid member of playergui

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

3 comments

0

You need to define the shop as an instance with a parent set as player gui

0

I suggest you to access the player gui from a local script

0

your username is screwing up the second script because it starts with a number, consider using "game.Players["6LB0"].PlayerGui" instead

1 answer

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)

1 comment

0

If the word, 'visible', isn't showing up, click 'view source'.

This discussion is preserved as it was. New answers, comments, and votes are closed.