Hey! I’m trying to make a local script that’ll change the color of something depending on what team you’re on, but I can’t seem to get it to work.
when I test it I get this error:
Players.LuigiLament.PlayerGui.Scripts.Color:8: attempt to call a table value
local Tool = game.Workspace.Tools
local Team = game:GetService("Teams")["Green"]
local plr = game.Players.LocalPlayer
plr:GetPropertyChangedSignal("Team")
print(plr.Team)
if plr.Team == Team then
for _, thing in ipairs(Tool:GetDescendants()()) do
if thing:IsA("SelectionBox") then
thing.Color3 = Color3.new(0,1,0)
thing.Color3 = Color3.new(0,1,0)
end
end
end
also a bit of a side thing, but does anyone know how to set a color3 value to one of another object? like a part’s or a team color?