So I'm making a team change gui, and being a beginner scripter it's not easy for me to make things FE.
If anyone has any idea how to turn this into FE, please help
local button = script.Parent local player = game.Players.LocalPlayer button.MouseButton1Click:connect(function() if player:IsInGroup(3761159) then player.TeamColor = BrickColor.new("Bright red") player:LoadCharacter() end end)
For scripting with FE, you'll need to use Remote Events a lot of the time. If you aren't familiar with those, you can read more about them here: http://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events
I would suggest making it so when you click the button, it fires an event to a server script, and when the server script receives the remote event, it will change that player's team.
something like this:
Local Script ~
local button = script.Parent local remoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent") button.MouseButton1Click:connect(function() remoteEvent:FireServer() end)
Server Script ~
local remoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent") remoteEvent.OnServerEvent:connect(function(player) if player:IsInGroup(3761159) then player.TeamColor = BrickColor.new("Bright red") player:LoadCharacter() end end