So I'm Making A Game Like Miner's Haven Where You Can Place Items And I'm Making The Money And Bases And I Get A Error When Setting Which Base The Player Gets. It Doesn't Print A Error.
Script:
game.Players.PlayerAdded:Connect(function(plr)
local Money = Instance.new("NumberValue")
Money.Parent = plr
Money.Name = "Money"
Money.Value = 0
for i,v in pairs(game.Workspace.Bases:GetChildren()) do -- Creates Multiple BoolValues For Each Of The Bases Not Only One.
for g,h in pairs(game.Players:GetDescendants()) do
if h ~=v.Name then
local Own = Instance.new("BoolValue")
Own.Name = v.Name
Own.Parent = plr
end
end
end
end)

3 comments
It doesn't change the value of the ObjectValue
Sorry, simple fix. Replace
table.insert(bases, false);on line 4 withbases[x] = false;Ok it works now, thanks!