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

Is this Text label color changing script when Gui button is clicked correct?

script.Parent.TextButton.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.NameTag.UpperText.TextColor3 = Color3.fromRGB(125, 255, 105)
	print("Worked")
end)

please help me if there is something wrong in my script. Let me know if I need to give you anymore info

8 comments

0

could you use a code block

0

Im very new to scripting, What does codeblock do and how?. Im very sorry

0
0

ok

0

are you cloning the nametag?

0

No, can you give me an example

0

it depends on what you are trying to make, Are you trying to make a nametag for a player?

0

Yes, Im supposed to make the color change from a nametag that exists there

1 answer

create a BillBoard Gui then put it into replicated storage then create a text label and put it into the billboard and customize it

local BillboardGui = game.ReplicatedStorage.BillboardGui
local TextLabel = BillboardGui.TextLabel

script.Parent.MouseButton1Click:Connect(function()
	local Name = game.Players.LocalPlayer.Name
	local PlayerCharacter = workspace:FindFirstChild(Name)

	BillboardGui.Parent = PlayerCharacter.Head
	BillboardGui.Adornee = PlayerCharacter.Head
	BillboardGui.StudsOffset = Vector3.new(0,3,0)
	BillboardGui.MaxDistance = 45
end)

sorry for the wait

5 comments

0

No problem thank you so much ill try it out

0

I have the billboard gui up with the text but when i run the script i always get "attempt to index nil with 'Name'" back in the errors

0

are you using a local script?

0

Even with a local it doesn't post an error, It runs the script but nothing happens

0

(Afk) Will respond soon if anything happens

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