Hello, i am making a clicker game that has 6 buildings and i implanted a data store system for saving cash, but i want it to save Buildings... and one specific building i want to test if it updates is Human. I want to test if Human can be saved and i put something in the script that makes it add value when it is clicked. But it is not working, so how do i fix this?
plr = script.Parent.Parent.Parent.Parent.Parent Cost = script.Parent.BuildingCost.Cost CPS = script.Parent.Parent.Parent.CPS HumanValue = plr.leaderstats.Human.Value script.Parent.MouseButton1Click:connect(function() if plr.leaderstats.Cash.Value >= Cost.Value then HumanValue = HumanValue + 1 if true then plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value - Cost.Value script.Parent.BuildingCost.Cost.Value = script.Parent.BuildingCost.Cost.Value + 6 script.Parent.BuildingCost.Text = "Requires $"..Cost.Value.. "" CPS.Value = CPS.Value + 1 end end end)