of     1   

Gage1104
#215933448Thursday, May 04, 2017 9:56 PM GMT

Is it possible to make a script that makes people go to different teams based on their leader stats? I am making a game where the longer you play the higher the level (team) you are on. (I made it so it saves how long you play when you leave so you don't need to do it again) The only problem I am having is when they start the game, how they would go to their "team." It would need to be in a normal script put in the Workspace. Thanks in advance!
Gage1104
#228415947Monday, December 04, 2017 4:04 AM GMT

b1
128Gigabytes
#228416746Monday, December 04, 2017 4:34 AM GMT

--[[Replace the word 'time' with whatever leaderstat you want, and adjust the teamValue table to your team colors and required values.]] local teamValue = { [1] = BrickColor.new("Bright red"); [10] = BrickColor.new("Bright green"); [50] = BrickColor.new("Bright blue"); } game.Players.PlayerAdded:connect(function(player) player:WaitForChild("leaderstats", math.huge):WaitForChild("time", math.huge).Changed:Connect(function(value) if (teamValue[value]) then player.TeamColor = teamValue[value] end return(nil); end return (nil); end)

    of     1