I've tried multiple ways to change the teams of players inside a table inside of a model but the only ways I've had to do that was locally which wouldn't work in a server script that I can only use. How can I make it work? Here are some of my attempts:
for _, player in pairs(script.Parent.Parent.Parent.Parent.Parent.PlayersTouching:GetChildren()) do player.TeamColor = BrickColor.new("Sea green") end
.
for i,v in pairs(script.Parent.Parent.Parent.Parent.Parent.PlayersTouching:GetChildren()) do v.TeamColor = BrickColor.new("Sea green") end
.
local players = game:GetService("Players") for i,v in pairs(script.Parent.Parent.Parent.Parent.Parent.PlayersTouching:GetChildren()) do if v.Parent:FindFirstChild("Humanoid") then players:GetPlayerFromCharacter(v.Parent) v.TeamColor = BrickColor.new("Sea green") end end