DS = game:GetService("DataStoreService")
MaxKi = DS:GetDataStore("kiMaxSave")
game.Players.PlayerAdded:Connect(function(plr)
print(plr.Name.."has joined the game")
local stats = Instance.new("Folder", plr)
stats.Name = "Stats"
KiMax = Instance.new("NumberValue", stats)
KiMax.Name = "KiMax"
KiMax.Value = MaxKi:GetAsync(plr.UserId) or 0
KiValue = Instance.new("NumberValue", stats)
KiValue.Name = "KiValue"
KiValue.Value = KiMax.Value
KiMax.Value.Changed:Connect(function()
MaxKi:SetAsync(plr.UserId, KiMax)
end)
end)
I've made this and it says
18:14:38.674 - ServerScriptService.Script:13: attempt to index field 'Value' (a number value)
as an error.

11 comments
????
so i remove the value?
i changed line 14 (or 13 in your original script) because it was wrong
yes, .Changed is called on the actual object, not the object's value
As he stated, .Changed is looking for changes in the Value of an instance, so since it already looks to the value theres no need to reference it directly.
notice how the passed parameter is the value name that changed: https://developer.roblox.com/api-reference/event/Instance/Changed
i added an example
good stuff gioni
thx dad. accept the answer if it helped tim, bc i saw you havent been accepting anyone's answers.
Events are not called
give me ur number and ill call u