:Resize() Only Adds Up The Size Value

In the following script, there is an issue concerning the built-in function :Resize() . This function requires two parameters: one from the Enum.NormalId category and the resize amount. However, it appears that the function is only adding to the size of the part rather than adjusting its dimensions.

local Flask = script.Parent
local LiquidPart = Flask:FindFirstChild("LiquidPart")

local LiquidVolume = Flask.LiquidVolume
local LiquidColor = Flask.LiquidColor

	LiquidPart:Resize(Enum.NormalId.Right, LiquidVolume.Value)

	LiquidPart.Color = LiquidColor.Value

I think this could’ve been intended only for the Resize tool of Studio, but keeping track of the Part’s Size can also work…?

im triying rn without using the function maybe we can get the current size and add up to that after the size change im trying that rn

yeah it worked i did like this:

local initialSize = LiquidPart.Size
    local newSize = initialSize + Vector3.new(LiquidVolume.Value, 0, 0)
    LiquidPart.Size = newSize

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.