I have some code here, basically what this does is fire a remote to the server to change the player to a certain team used with strings ("").
This all seems to work well, printing, etc but the teaming part of this does not seem to be working.
This made me discombobulated, due to the fact I’m firing the teams name with a string to the server, then finding the first child with the contents of that team. Dejectedly, I’m unsure if this is possible or not, but if it is please don’t hesitate to enunciate!
Server:
local Services = require(game:GetService(“ReplicatedStorage”).Modules.ScriptModules.Services)
Services.ReplicatedStorage.Remotes.Events.MenuEvent.OnServerEvent:Connect(function(Player, Type, …)
if Type == “ChangeTeam” then
local Team = …
print(“team”)
Player.Team = Services.Teams:FindFirstChild(Team)
end
end)
Client Script:
local CurrentTeam = “Test Subject”
local MenuEvent = game.ReplicatedStorage.Remotes.Events.MenuEvent
MenuEvent:FireServer(“ChangeTeam”, CurrentTeam)