So, I'm developing a game called 'Bullseye', I'm working on adding a lobby script and I've done most of it but I don't know how to implement teams into the script, if someone could help me I would really appreciate it, the teams are "Feds", "Terrorists" & "Civilians", I need to somehow make the script randomly place players into one of the teams. [Civilians should have the most players, Feds should have 2nd most players and Terrorists should have around 2-3 players in it]
Thanks for any help! Your help is greatly appreciated!
Here is the script:
while true do local start = 10
local hint = Instance.new("Hint") hint.Parent = game.Workspace for i = 1,start do hint.Text = start - i wait(1) end hint.Text = "Game Starting" -- Change this to what you want it to say when its starting the game wait(2) hint:remove()
target = CFrame.new(-4.4, 98.39, 34.4) -- Location you want them to go for i, player in pairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) end
local start = 500 local hint = Instance.new("Hint") hint.Parent = game.Workspace for i = 1,start do hint.Text = start - i wait(1) end hint.Text = "Game Over" -- Lose message p = game.Players:GetChildren() for i = 1,#p do p[i].Character.Head:remove() end wait(2) hint:remove()
end
With implementing, you're going to need to use a instance.new, to insert it into teams. instance.new is the type of code, to insert stuff into games. If you're going to want to make that, I'd suggest making it a function, and calling it. Like this
function teams() local T1 = instance.new("Team1",Teams) T1 = Color3.new(COLOR,COLOR,COLOR) end teams() -- This calls the function. I suggest you add a "Wait(1)", and put this part where you want to insert teams.
This is probably not correct, because I didn't check it but if it works your welcome.