If you setup the Tween correctly with the TweenInfo data, then it will repeat automatically:
local tweenInfo = TweenInfo.new(
5, -- The time the tween takes to complete
Enum.EasingStyle.Bounce, -- The tween style.
Enum.EasingDirection.InOut-- EasingDirection
1, -- How many times you want the tween to repeat. If you make it less than 0 it will repeat forever.
true, -- Reverse on complete
--0 -- Delay
)
heartbeat.Played:Connect(function()
local tween = ts:Create(healthicon, tweenInfo, {Size = UDim2.new(0.65, 0, 0.65, 0)})
tween:Play()
end)