I have been trying to make a script that when touching a brick it changes a Guis color (for everyone) to the color of the player who touches the bricks team, a fix would be very much appreciated.
team = script.Parent
flag = script.Parent.Parent.Flag
pole = script.Parent.Parent.Pole
teamGui = game.StarterGui.ScreenGui.TextBox
function onTouch(hit)
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if user ~= nil then
team.BrickColor = user.TeamColor
flag.BrickColor = user.TeamColor
teamGui.BackgroundColor3 = user.TeamColor
end
script.Parent.Touched:connect(onTouch)

1 comment
Guis arent replicated to the server