I am trying to make a Backpack thing where it lerps from red to green the closer you get to part and from green to red when the further you are from a part, the issue is that when I move the color goes crazy, it changes to random colors.
local runservice = game:GetService("RunService")
runservice.Heartbeat:Connect(function()
local mag = (char.HumanoidRootPart.Position - game.Workspace.FinishLine.Position).magnitude
clone.Color = Color3.fromRGB(60, 255, 0):Lerp(Color3.fromRGB(255, 0, 0), math.clamp(mag, 0, 100))
end)
