I’m trying to get my BoolValues set to true, no errors, and I don’t know what else to do. I don’t want to make a if statement to check if its false because of the characters. Do I need to add this to a new / different script?
local function playerJoined(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local character = Instance.new("Folder")
character.Name = "BoughtChar"
character.Parent = player
local character2 =Instance.new("Folder")
character2.Name = "EquippedChar"
character2.Parent = player
local gamepasses = Instance.new("Folder")
gamepasses.Name = "Gamepass"
gamepasses.Parent = player
local wins = Instance.new("IntValue")
wins.Name = "Wins"
wins.Parent = leaderstats
wins.Value = 0
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Parent = leaderstats
coins.Value = 0
-- Characters --
local defaultCharacter = Instance.new("BoolValue")
defaultCharacter.Name = "char1"
defaultCharacter.Parent = character
defaultCharacter.Value = true
local equippedDefault = Instance.new("BoolValue")
equippedDefault.Name = "char1"
equippedDefault.Parent = character2
equippedDefault.Value = true
local char2 = Instance.new("BoolValue")
char2.Name = "char2"
char2.Parent= character
char2.Value = false
local equippedChar2 = Instance.new("BoolValue")
equippedChar2.Name = "char2"
equippedChar2.Parent = character2
equippedChar2.Value = false
-- GamePasses --
local rainbowText = Instance.new("BoolValue")
rainbowText.Name = "RainbowText"
rainbowText.Parent = gamepasses
rainbowText.Value = false
local coinMulti = Instance.new("IntValue")
coinMulti.Name = "CoinMultiplier"
coinMulti.Parent = gamepasses
coinMulti.Value = 1
-- Do not put in Datastore --
local statistics = Instance.new("Folder")
statistics.Name = "Statistics"
statistics.Parent = player
local inGame = Instance.new("BoolValue")
inGame.Name = "inGame"
inGame.Parent = statistics
inGame.Value = false
local alpha = Instance.new("BoolValue")
alpha.Name = "Alpha"
alpha.Parent = player
alpha.Value = true
end
game.Players.PlayerAdded:Connect(playerJoined)