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

BillboardGui1 is not a valid member of PlayerGui "Players.jeremqpmfpi.PlayerGui"?

i am trying to make it so that when the player joins and they are on the construction team it should put the gui over a certain light part but that error pops up   11:12:55.352 BillboardGui1 is not a valid member of PlayerGui "Players.jeremqpmfpi.PlayerGui" - Server - ClickDetectorScript:6

here is my code

local clickdetecter = script.Parent:WaitForChild("ClickDetector")
local Team = game:GetService("Teams"):WaitForChild("Construction")
local function OnPlayerJoin(player)
	if player.Team == Team then
		player.PlayerGui.BillboardGui1.Enabled = true
		print("gui is now enabled")
	end
end

game.Players.PlayerAdded:Connect(OnPlayerJoin)

local function onMouseClick(player)
	
	print('player who clicked is ' .. player.Name)
	if script.Parent.broken.Value == true then
		if player.Team == Team then
			print("player is on construction")
			script.Parent.broken.Value = false
		else
			print("player is not on construction")
		end
	else
		print("light is not broken")
	end
end

clickdetecter.MouseClick:Connect(onMouseClick)

1 answer

i kinda figured it out the script was a server script not a local script you need a local script to change gui properties so i will be doing that

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