Hello! I have been looking in a ton of places, but can't find any help for this. I have a server script with this code:
local ReplicatedStorage = game.ReplicatedStorage local CreateEvent = ReplicatedStorage.Events:WaitForChild("CreateEvent") local City = game.ReplicatedStorage.Cities.City function Fired(plr) local char = plr.Character local leg = char["Left Leg"] local offset = Vector3.new(0, 0, 0) local Cloney = City:Clone() Cloney.Parent = workspace Cloney:MoveTo(leg.Position + offset) if plr.TeamColor == "Shamrock" then Cloney.CityBase.BrickColor = BrickColor.new("Shamrock") elseif plr.TeamColor == "Maroon" then Cloney.CityBase.BrickColor = BrickColor.new("Maroon") end end CreateEvent.OnServerEvent:Connect(Fired)
I am still working on the offsets and other things in this script, so don't judge. I tried using
BrickColor.new(plr.TeamColor)
and that didn't work either, but it will work in a local script. Any help is appreciated!
TeamColor
property is not a string, it is a BrickColor
value. You use it in conditionals like this:if plr.TeamColor == BrickColor.new("Shamrock") then
plr.TeamColor = BrickColor.new("Shamrock")