-
What do you want to achieve?
Reduce an Attribute value by a data store. -
What is the issue?
I tried a few things and figured I’d ask for help. Not sure if I can convert it to an int or something. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
function funMod.DealDmg(localPlayer)
local boss = game.StarterGui.ScreenGui.Monster
local healthAtt = boss:GetAttribute("Health")
local DamageStore = DataStore2("Damage", localPlayer)
--I need some logic, like healthAtt(toInt32) - DamageStore
boss:SetAttribute("Health", healthAtt - DamageStore) -- Doesn't work sadly.
end