I was going to post this into the #bug-reports category but I dont have permissions yet.
But this will do too ig
For some reason when I disable character auto loading for my game and put this script into SSS (ServerScriptService) (or any other valid place) then it crashes my game for no reason.
Do you maybe know a reason to it? Or is there an alternative for manual character loading?
local teams = game.Teams:GetTeams()
local spy = game.Teams.Spy
local sniper = game.Teams.Sniper
game.Players.PlayerAdded:Connect(function(player: Player)
-- Uncomment the line below to crash
-- player:LoadCharacter()
local playerGui = player:WaitForChild('PlayerGui')
local random = math.random(#teams)
local team = teams[random]
if #team:GetPlayers() == team:GetAttribute('MaxMembers') then
team = team == spy and sniper or spy
end
player.Team = team
playerGui:WaitForChild('TimerGui').Frame.TextLabel.Text ..= (team == spy and sniper or spy).Name
end)
-- removing the lines below wont do anything regarding the crash
while #game.Players:GetPlayers() < 2 do task.wait() end
for _,ply in pairs(game.Players:GetPlayers()) do ply.PlayerGui.TimerGui.Enabled = false end
if somehow roblox stuff will respond then I can send dumps and my place to them.