local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
if (#game.Teams["Red Team"]:GetPlayers() > #game.Teams["Blue Team"]:GetPlayers()) then
script.Parent.Text = "Error, teams will result unbalanced"
wait(2)
script.Parent.Text = "Join Red"
elseif (#game.Teams["Red Team"]:GetPlayers() <= #game.Teams["Blue Team"]:GetPlayers()) then
player.TeamColor = BrickColor.new("Bright red")
player.Character.Torso.CFrame = CFrame.new(game.Workspace.redspot.Position)
script.Parent.Parent.Visible = false
end
end
end)
Hello, I have this script here, that is basically a local script in a frame that has a team selection. It works fine, but not when filtering enabled is turned on :/ I've tried looking at at Roblox wiki and making remote events for this based off that, but I couldn't get it to work. The exact problem is that everything works except it doesn't change the players team. I was wondering if anyone could help me out and break it down in a way for me to understand, thanks...
