Changing color of text in function?
Asked by
5 years ago Edited 5 years ago
So, I made a Text Box and when you press enter, the text you entered will then display above your head. The problem is, it works.... BUT when I try to add script to make it change color, font, and remove the border pixel, it doesn't work. I've looked into how to fix this but I still have no clue what to do. Thanks.
01 | script.Parent.FocusLost:connect( function (enter) |
03 | v = game.Players.LocalPlayer |
04 | for a, mod in pairs (v.Character:children()) do |
05 | if mod:findFirstChild( "NameTag" ) then |
06 | v.Character.Head.Transparency = 0 mod:Destroy() |
10 | local char = v.Character |
11 | local mod = Instance.new( "Model" , char) |
12 | mod.BorderPixelSize = 0 |
14 | mod.BackgroundColor 3 = ( "246, 197, 255" ) |
15 | mod.Name = script.Parent.Text |
16 | local cl = char.Head:Clone() |
20 | local hum = Instance.new( "Humanoid" , mod) |
25 | local weld = Instance.new( "Weld" , cl) weld.Part 0 = cl weld.Part 1 = char.Head |
26 | char.Head.Transparency = 1 |