So, I have a little problem. I set up a Starter GUI like this -Team Change GUI --Open --TeamChanger ---Acilagordians(Don't ask) ---Close ---King ----Script ----KillScript ---Outsiders ---Raiders
And I set up the script like this:
function Click(mouse) if script.Parent.Parent.Parent.Parent.Parent.userId = 29828165 then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow") script.Parent.Parent.Parent.Parent.Parent.Neutral = false end end script.Parent.MouseButton1Click:connect(Click)
But... It does nothing to what team I am on. Please help. How do I fix this script?
You have an error, I would recommend using something along the likes of this within a LocalScript as opposed to a server-sided script.
local Player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() -- Anonymous function if Player.userId == 29828165 then Player.TeamColor = BrickColor.new("Bright yellow") Player.Neutral = false end end) -- End the function (Bracket to close the connection line)