I am trying to make a script that shows the color of your team as a gui.
while true do wait(.1) local player = script.Parent.Parent.Parent.Parent.Parent local team = player.TeamColor.Color print(team) script.Parent.BackgroundColor3 = Color3.new(team) end
The output of print is 0.768628, 0.156863, 0.109804 and when i replace it with team on 'script.Parent.BackgroundColor3 = Color3.new(team)' it works, why doesnt it work with team?
To fix this, you can just remove the Color3.new constructor, as you already obtained the Color3 equivalent of the players teamcolor with the .Color property. Fixed code:
while true do wait(.1) local player = script.Parent.Parent.Parent.Parent.Parent local team = player.TeamColor.Color print(team) script.Parent.BackgroundColor3 = team.Color end
If this helped, please be sure to accept this answer!