Fix springs passing negative Color3 values (#25)

* Fix springs passing negative Color3 values

* Clamp color values between 0 and 1
This commit is contained in:
richard 2024-04-21 05:57:29 -07:00 committed by GitHub
parent 3d324cc30b
commit e1d69afa20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,7 +111,7 @@ local vec6_to_type = {
end :: Vec6ToType<CFrame>,
Color3 = function(v)
return Color3.new(v.X, v.Y, v.Z)
return Color3.new(math.clamp(v.X, 0, 1), math.clamp(v.Y, 0, 1), math.clamp(v.Z, 0, 1))
end :: Vec6ToType<Color3>,
UDim = function(v)