for i,v in pairs(model.PlayersTouching:GetChildren()) do
local player = game.Players.LocalPlayer
player.TeamColor = BrickColor.new("Sea green")
end
How would I make this script in a regular script not be run locally? The PlayersTouching is a table model inside a model that creates a list inside of itself of all the players touching the model which works perfectly fine. But I need all the players in that table to get their team changed and I've been struggling to figure out how to not do it locally. Help?

2 comments
LocalPlayer can only be accessed by a LocalScript. Note that a LocalScript should only ever be a descendant of a player and never anything else. It just won't work.
If I helped you out, please accept my answer.