Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Quick Question: How to change team with FE?

I tried to but it is only local with Filtering Enabled. How else can you change team?

local Team = script.Parent.Name
local Team = game.Teams:FindFirstChild(Team)
game.Players.LocalPlayer.Team = Team

1 comment

0

On the server..?

1 answer

✓ Accepted answer

You can have a remote **function **called 'ChangeTeam' inside ReplicatedStorage, then a script like this in ServerScriptStorage:

local remote = game.ReplicatedStorage.ChangeTeam

function remote.OnServerInvoke(player, TeamName)
	player.TeamColor = BrickColor.new(TeamName) -- Please note that this is how you switch roblox teams.
end

So what the code above does is simple. Once invoked, it gets 2 pieces of information. The player, and the Team name. Then it changes the player's team. You can invoke this remote function to change any player's team from the client with FE on, and it does not matter which team you want them to be. Now, you just need to Invoke it.

--at the start of the script
local remote = game.ReplicatedStorage.ChangeTeams
--now invoke it when wanted to in the script:
remote:InvokeServer("Dark blue") -- This will send "Dark Blue" as the 'TeamName' (It's just the Team color to be exact) change Dark Blue to what you want it to be, from one script to another.

Now you have a FE change teams system! All you need is the first script, the RemoteFunction, and the knowledge of adjusting the 2nd script to what you want.

This discussion is preserved as it was. New answers, comments, and votes are closed.