I’m trying to tween an audio volume to be quieter when health is slowly regenerating to full but louder when it’s decreasing, I figured it for image transparency since it goes from 1 to 0 but not sure about audio volume since it’s opposite.
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local GUI = Player:WaitForChild("PlayerGui").Main.ImageLabel
Humanoid.HealthChanged:Connect(function(Health)
game:GetService("TweenService"):Create(GUI, TweenInfo.new(0.2), {ImageTransparency = Health/Humanoid.MaxHealth}):Play()
game:GetService("TweenService"):Create(workspace.Sound, TweenInfo.new(0.2), {Volume = Health/Humanoid.MaxHealth}):Play() -- Which formula?
end)