Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Trying to script a group auto assign team for a game. How can I do this?

I am trying to script a team auto assign to my game and that it would put you in the team of your rank. Although I am also trying to make the option for a raider and visitor choose able but It always doesn't work when I watch tutorials, try it for myself and read forums on it. It is taking hours! Please help!

2 comments

0

The link isn't working :/

1 answer

✓ Accepted answer

Hello be sure to read the things that i say in the script it's important for usage, but here you go:

be sure to disable the AutoAssignable property off cause then it will randomly give a team to a user

local groups = {
[0000] = "TeamNameHere",	-- insted of the 0000 add ur groups id
[2951985] = "Team2"
}

game.Players.PlayerAdded:Connect(function(player)
	for ids,team in pairs(groups) do
		if player:IsInGroup(ids) then
			player.Team = game.Teams[team]
		end
	end
end)

If worked please accept, thank you

1 comment

0

Yea, it is sort of working but I am trying to figure out how put in the group ranks too. Thanks anyways!

This discussion is preserved as it was. New answers, comments, and votes are closed.