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

Why won't it insert a boolean on reset?

Asked by
NotSoNorm 777 Moderation Voter
9 years ago

This script "should" work, but when I reset it doesn't fire and doesn't insert a boolean again

game.Players.PlayerAdded:connect(function(player)
    local already = false
    player.CharacterAdded:connect(function(character)
       for i,v in pairs(character:GetChildren()) do
        if v.Name=="InGame" then
        already=true
        end
    end
    if not already then
    local InGame = Instance.new("BoolValue",character)
    InGame.Name = "InGame"
    end
    end)
end)

Answer this question