Roblox why can't you just add tweening in only direction like position, but for size it's irritating

Like dude it’s so annoying I only wanna tween 1 direction to animate a cafe cup from 0.1 to 0.9 to act like the cup is actually filling up and IT’S LITERALLY IMPOSSIBLE. Why can’t roblox just do Vector.new(0.1, 0, 0) to tween the other direction
(-0.1, 0, 0), but noooo you wanna make it so irritating bro… Like please for the love of god add this feature that’s how resizing should OF BEEN in the first place, why does it tween both directions that is so dumb and frustrating, this needs to be added like right now because I am tired of this.

1 Like

BasePart:Resize()

this is what I’m trying to do

I had to use vector3.new to move the part from the bottom then the original position, so back up which is so dumb, I’d rather tween the parts size

thats what :Resize does, changes size just like the studio resize tool

local TweenService = game:GetService("TweenService")
local referencePart = script.Parent.Parent:WaitForChild("Reference")
local sound = script:FindFirstChild("Sound")
local pourSound = script:FindFirstChild("PourSound")
local completeSound = script:FindFirstChild("CompleteSound")
local dripParticle = script.Parent.Parent.Drip.ParticleEmitter

-- Track machine state
local isMachineBusy = false
local currentProcessingCup = nil

local function onTouch(hit)
	if isMachineBusy then return end

	local character = hit:FindFirstAncestorOfClass("Model")
	if not character then return end

	local player = Players:GetPlayerFromCharacter(character)
	if not player then return end

	local humanoid = character:FindFirstChildOfClass("Humanoid")
	if not humanoid then return end

	-- Check for equipped cup
	local cupTool = humanoid:FindFirstChildOfClass("Tool") or character:FindFirstChild("Cup")
	if not cupTool or not cupTool:IsA("Tool") or cupTool.Name ~= "Cup" then return end

	-- Mark machine as busy
	isMachineBusy = true
	currentProcessingCup = cupTool

	-- Unequip the tool first
	cupTool.Parent = player.Backpack

	-- Clone the Tool
	local toolClone = cupTool:Clone()
	toolClone.Name = "Water"
	cupTool:Destroy()

	-- Create model to hold the parts
	local cupModel = Instance.new("Model")
	cupModel.Name = toolClone.Name

	-- Find and prepare drink part
	local drinkPart = toolClone:FindFirstChild("Drink")

	-- Anchor and position all parts
	for _, obj in ipairs(toolClone:GetChildren()) do
		if obj:IsA("BasePart") then
			obj.Anchored = true
			obj.CFrame = referencePart.CFrame
			obj.Parent = cupModel
		end
	end

	cupModel.Parent = referencePart

	-- Configure drink part if exists
	if drinkPart then
		-- Set visual properties
		drinkPart.BrickColor = BrickColor.new("Sand blue")
		drinkPart.Material = Enum.Material.Glass
		local originalPosition = drinkPart.Position
		local targetPosition = originalPosition - Vector3.new(0, 1, 0)  -- Move it down without changing size

		-- Set initial position to simulate drink being at the bottom
		drinkPart.CFrame = CFrame.new(targetPosition)
		drinkPart.Transparency = 0

		-- Create the tween to move it back up to the original position
		local tweenInfo = TweenInfo.new(8, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
		local tweenGoals = {CFrame = CFrame.new(originalPosition)}  -- Only moving position, no size change

		-- Create and play the tween
		local tween = TweenService:Create(drinkPart, tweenInfo, tweenGoals)
		tween:Play()
		if pourSound then pourSound:Play() end
		if dripParticle then dripParticle.Enabled = true end

	

tween.Completed:Wait()
pourSound:Stop()
end
	-- Stop pouring effects
	if dripParticle then dripParticle.Enabled = false end
	if completeSound then completeSound:Play() end

	-- Add click detector
	local clickDetector = Instance.new("ClickDetector")
	clickDetector.Parent = cupModel.PrimaryPart or cupModel:FindFirstChildWhichIsA("BasePart") or cupModel

	clickDetector.MouseClick:Connect(function(clickingPlayer)
		if clickingPlayer ~= player then return end

		-- Create new tool
		local newTool = Instance.new("Tool")
		newTool.Name = cupModel.Name

		-- Transfer parts back to tool
		for _, obj in ipairs(cupModel:GetChildren()) do
			if obj:IsA("BasePart") then
				obj.Anchored = false
				obj.Parent = newTool
			end
		end

		-- Ensure tool has a Handle
		if not newTool:FindFirstChild("Handle") then
			local handle = Instance.new("Part")
			handle.Name = "Handle"
			handle.Parent = newTool
		end

		-- Return to player
		newTool.Parent = player.Backpack
		cupModel:Destroy()

		-- Machine available again
		isMachineBusy = false
		currentProcessingCup = nil
	end)

	-- Cleanup if player leaves
	player.CharacterRemoving:Connect(function()
		if cupModel and cupModel.Parent then
			cupModel:Destroy()
		end
		isMachineBusy = false
		currentProcessingCup = nil
	end)
end

script.Parent.Touched:Connect(onTouch)``` 


this is my code.
local tween = tService:Create(part, tweenInfo, {Size = part.Size.X, part.Size.Y + 5, part.Size.Z})

does this not work?

I got so frustrated I had to beg chatgpt to find out a method so that’s why it looks AI.

I’ll try it, but most of the methods it just moves my cup it’s annoying

Just tween the position of the part that rises within the cup alongside its size.

For example:

local part = script.Parent
local TS = game:GetService("TweenService")
local increment = 5

TS:Create(part, TweenInfo.new(1), {Size = part.Size+Vector3.new(0,increment,0), CFrame = part.CFrame*CFrame.new(0,increment/2,0)}):Play()
1 Like

I need the drink part to stay in place because it’s a cup on a water dispenser, I’m trying to get realistic for my cafe.

none of these methods work, literally the only thing I can do is just move the drink part from the bottom then the original position.

andro’s should work, i think you are doing something wrong

Unless the part that represents the water is welded with a legacy Weld instead of a WeldConstraint, I don’t see the issue. I tested it in studio and the part just stays in place and looks just like scaling it with the scale tool, despite its position also being changed according to the resize.

I tried using :Resize() but it seems to not take a low increment to make it seem smooth. So for now try tweening both Size and Position.

also i just found out :Resize() only resizes until colliding with something :man_facepalming:

it only works when you’re tweening from 1 to 10 for example I’m trying to 0.1 to 0.9 or 1 and have a tweening of 8 to have a realistic time of filling a cup every method works when i change the increment to 10, but when I change it 0.9 my water part randomly is floating and it moves my water

How is the water welded to the cup?

when it touches the part its not a tool anymore its parented to the model, and it’s anchored its not even welded

probably because of unions, their collisions arent that great