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

Help with Changing text color for labels when text button clicked?

Please help me with changing my text labels color when a button Gui is clicked, So far i have.

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.NameTag.UpperText.TextColor3 = Color3.fromRGB(255, 171, 35)
	print("Heh")
end)

When this runs it worked, because it prints Heh but when it runs the color for the text label doesn't change. Please help me :)

1 answer

✓ Accepted answer

What I could guess is this is a overhead GUI script.

You have to clone it and put it onto player's head again to see the colour. Otherwise, you could change the color from his character' head GUI which exists already.

local plr = game.Players.LocalPlayer
local char = plr.Character
local text = char.Head.NameTag.UpperText -- You may need to change it

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.NameTag.UpperText.TextColor3 = Color3.fromRGB(255, 171, 35)
    text.TextColor3 = Color3.fromRGB(255, 171, 35)
    print("Heh")
end)

4 comments

0

I will see if this works, Yes it is an overhead gui thank you

0

AWWWWWWW SICK, IVE BEEN WORKING ON THIS FOR SO LONG THANK YOU

0

The ReplicatedStorage adjustment is redundant, that's what TeaWithMee did wrong. Why are you still including the snippet?

0

@Ziffixture so if they clone it from ReplicatedStorage again, the color change applies and does not get resetted.

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