local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
ServerStorage.Values.Day:GetPropertyChangedSignal("Value"):Connect(function()
for i,v in ipairs(game.Workspace[Player.Name]:GetDescendants()) do
wait()
if v:IsA("Model") then
wait()
local Pop = v.Values.AddedHousing
print(Pop.Value)
Player.Stats.Population.Value = Player.Stats.Population.Value + Pop.Value
Pop.Value = 0
print(Pop.Value)
end
end
end)
end)
Problem is its not getting all the Houses in workspace. Its only getting the 1st one. Tried to get help elsewhere but to no avail. Any assistance?