So, I have a team change GUI and it only seems to work in roblox studio. I will give you guys full detail. I have more than 1 team spawns for each team(including the neutral team/choosing) and the script is a local script. I have one local script for each button(Red team and blue team). I figured this cant be a problem where I need FE because all it does is kill the player once they click the GUI to send them to the team. If i do need FE, what do I use? :FireClient()? Thank you all. Here is the local script in both textbuttons:
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() player.TeamColor = BrickColor.new("Cyan") workspace[player.Name].Head:Destroy() end)
Yes, you will need FE. The way you should go about this is by using Remote:FireServer(NewTeamName)
from a LocalScript to signal that the player wants to switch teams. Then, on the server do something like this
Remote.OnServerEvent:Connect(function(Player, NewTeamName) local newTeam = game.Teams:FindFirstChild(NewTeamName) if newTeam then Player.Team = newTeam workspace[Player.Name]:BreakJoints() end end)