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

My script output says text is not a valid member of TextLabel, help?

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")

game.Players.PlayerAdded:Connect(function(player)
	
	player.CharacterAdded:Connect(function(character)
		
		local clonedgui = billboardgui:Clone()
		clonedgui.TextLabel.text = "Player"
		clonedgui.TextLabel.TextColor3 = Color3.fromRGB(0,0,255)
		clonedgui.Parent = game.Workspace:WaitForChild(play.Name).Head
		
		
	end)
	
	
end)

1 answer

✓ Accepted answer

Lua is case-sensitive, you must always match the capitalization of existing properties, methods, function handles, and more... The Text property has a capitalized T, therefore you'll have to incorporate this within your Script:

local serverStorage = game:GetService("ServerStorage")
local billboardGui = serverStorage:WaitForChild("BillboardGui")

local players = game.Players

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local clonedGui = billboardGui:Clone()
		clonedGui.TextLabel.Text = "Player"
		clonedGui.TextLabel.TextColor3 = Color3.b
		clonedGui.Parent = character.Head
	end)
end)

if this helps, don't forget to accept this answer!

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