Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Is there an easier and applicable way to create this team pick script?

Asked by 5 years ago

I have been working on a script for this war group I am creating a fort for. They requested a script that will create a team pick option at the Start of the game. Everything was going fine until I added this part of the script.

game.Players.PlayerAdded:connect(function(plr)

    local stats = Instance.new("IntValue",plr)  
        stats.Name = 'leaderstats'

    local career = Instance.new("StringValue",stats)
        career.Name = 'Career'
            career.Value = 'Raiders'

            local career = Instance.new("StringValue",stats)
        career.Name = 'Career'
            career.Value = 'Allies'

            if not then career = Instance.new("StringValue",stats)
        career.Name = 'Career'
            career.Value = 'Immigrant'
            wait (0)


end)

This has not worked as this is my 3rd time rescripting it and it is still not working. Anyone have any tips for this script?

2
`if not then` is invalid syntax theCJarmy7 1293 — 5y
2
Other tips: Indent properly; Don't wait(0); theCJarmy7 1293 — 5y
0
use if Object == nill then Rest of code Sergiomontani10 236 — 5y

Answer this question