local rep = game:GetService("ReplicatedStorage")
local teams = game:GetService("Teams")
local players = game:GetService("Players")
local roundstart = false
function assignteam()
local allplr = players:GetPlayers()
local killerteam = teams.Killer
local survivorteam = teams.Survivors
for _,plr in pairs(allplr) do
plr.Neutral = false
plr.Team = survivorteam
end
--[[if #allplr >=2 then
local killerindex = math.random(1,#allplr)
local killerplr = allplr[killerindex]
killerplr.Neutral = false
killerplr.Team = killerteam
end ]]
end
function startround()
if roundstart == true then return end
while #players:GetPlayers() <= 1 do
print("Waiting for more players...")
task.wait(1)
end
if roundstart == false then
roundstart = true
print("Round started")
end
local allplr = players:GetPlayers()
for i = 10,1,-1 do
task.wait(1)
print("INTERMISSION TIME- "..i)
end
assignteam()
gamestartandends()
end
function gamestartandends ()
while #players:GetPlayers() <= 1 do
print("Waiting for more players...")
task.wait(1)
end
for i = 20,1,-1 do
task.wait(1)
print("GAME ENDS IN- "..i)
end
roundstart = false
print("GAME ENDED NEW STARTING")
task.wait(1)
startround()
end
startround()
#error
1 messages · Page 1 of 1 (latest)
@grave gate sorry for ping
in here i am getting error
like all player are getting on killer team
and on player 1 pov all are on survivor
while on player 2 pov all are on killer
and on player 3 pov he is only survivor
whats the error
i just told 😭
yea
is it a local script
idk when i run the code everyone just goes on the survivors team
your teams auto assignable?
yea
nope
not auto assign
@blissful wind
idk whats the error
i did every thing correct
im not getting that issue you must be assigning teams somewhere else in the code
like um?
What’s ur error can u explain more
its more of a bug
Tbh bro ur code is so bad rewrite ts
I can give a planning sheet
To rewrite if u want
i think hes saying that the clients teams dont match for each client
yeaa
💔
teams are not assigned well
like 3 killers
when there should be one
😭 😭
Use runservice heartbeat for timers since it’s more accurate and easier to cancel/manage in general
Before u assign neutral team first select a random player to be killer then loop through all players in game and if they’re not the killer then assign their team to neutral
When the round ends set people in the neutral and killers team to wtv ur default team is
And also use a module for this if u want it more manageable and u cant take a step further and use oop
hm
is this really the level s1s are on?
I don’t think he’s s1 bro
no
how did he get s1
i thought the bug was the clients teams mismatching for each client
oh
i am re coding it
guidelines were different back then, it's been fixed now