Tweening problems

You can write your topic however you want, but you need to answer these questions:

  1. I want the tweened part NOT to go back to the original position

2.It goes back to original position

wait(1)

local humanoid = script.Parent:WaitForChild('Humanoid')
local humrp = script.Parent:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
local Animate = Instance.new("Animation")

local bin = true

Animate.AnimationId = "rbxassetid://15251945896"
local AnimateTrack = animator:LoadAnimation(Animate)
------------------------------------------------------------------------------------------------
local TweenService = game:GetService("TweenService")

local info = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local info2 = TweenInfo.new(
	4,
	Enum.EasingStyle.Cubic,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)
------------------------------------------------------------------------------------------------
workspace:WaitForChild("MoontainPart").Touched:Connect(function()
	if bin == true then
		bin = false
		local Ico = workspace.IcoEnergy.MoontainICO
		local goPart = workspace.MoontainGoPart
		local newSize = Ico.Size - Vector3.new(2.25,2.5,2.125)
		local tween1 = TweenService:Create(Ico, info2, {Position = goPart.Position, Size = newSize})
		
		tween1:Play()
		tween1.Completed:Wait()
	end
end)

Also don’t worry about the humanoid and animations locals and scrits, thats for the rest of script

Does it tween back to the original location or teleport back? I would also like to see a video!

The Part(in this case a mesh) teleports back to the original position

I know this probably isn’t a good permenant solution, but you could just set the end properties right after the tween ends.

edit: i’m pretty sure its a better idea to use CFrame rather than vector3

Try this? (I didn’t test it)

wait(1)

local humanoid = script.Parent:WaitForChild('Humanoid')
local humrp = script.Parent:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
local Animate = Instance.new("Animation")

local bin = true

Animate.AnimationId = "rbxassetid://15251945896"
local AnimateTrack = animator:LoadAnimation(Animate)
------------------------------------------------------------------------------------------------
local TweenService = game:GetService("TweenService")

local info = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local info2 = TweenInfo.new(
	4,
	Enum.EasingStyle.Cubic,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)
------------------------------------------------------------------------------------------------
workspace:WaitForChild("MoontainPart").Touched:Connect(function()
	if bin == true then
		bin = false
		local Ico = workspace.IcoEnergy.MoontainICO
		local goPart = workspace.MoontainGoPart
		local newSize = Ico.Size - Vector3.new(2.25,2.5,2.125)
		local tween1 = TweenService:Create(Ico, info2, {CFrame = goPart.CFrame, Size = newSize})
		
		tween1:Play()
		tween1.Completed:Wait()
	end
end)

doesn’t work :frowning: , btw i tried with other parts and it works fine. If this helps this script is a localscript in starter character scripts

Is there other parts of the script affecting the part?

Omg yes, i just checked by removing a script with rotated the mesh using CFrame, u r a life saver.