How do I tween a model

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

  1. What do you want to achieve? Keep it simple and clear!
    Tweening a locker door

  2. What is the issue? Include screenshots / videos if possible!
    The door won’t tween

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    None, none are similar enough.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

--i am currently testing it so expect it to be confusing
local Prox = script.Parent.Attachment.ProximityPrompt
local IsTaken = script.Parent["IsTaken?"]
local delay = false
local OpenTween = game:GetService("TweenService"):Create(script.Parent.Parent.Parent.Door, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.In, 0, false, 0), {["WorldPivot"] = script.Parent.Parent.Parent.DoorOpen.CFrame})
---
Prox.Triggered:Connect(function(Plr)
	OpenTween:Play()
	local Hum = Plr.Character:FindFirstChildOfClass("Humanoid")
	if Hum and IsTaken.Value == false and delay == false and not Hum:HasTag("Died") then
		delay = true
		IsTaken.Value = true
		Hum:AddTag("Hidden")
		Plr.Character.HumanoidRootPart.Anchored = true
		Plr.Character:PivotTo(script.Parent.CFrame)
		wait(0.2)
		delay = false
		Prox.Triggered:Connect(function(Plr2)
			if Plr2 == Plr and delay == false and IsTaken.Value == true then
				delay = true
				IsTaken.Value = false
				Plr.Character.HumanoidRootPart.Anchored = false
				Hum:RemoveTag("Hidden")
				Plr.Character:PivotTo(script.Parent.Attachment.WorldCFrame)
				wait(0.2)
				delay = false
			end
		end)
	end
end)
1 Like

What do you mean by saying “the door won’t tween”? Is there any errors?

If you want to know how to tween a model someone already answered:

This tutorial should help you on how to tween a model, which in this case be your door: How to Tween / Animate a Door [2021 Tutorial] - Roblox - YouTube

1 Like

I am trying to tween a model, and my model will just not tween.

I know how to tween, but how do I tween the model? Also that is 2021 so I do not trust it to still work.

The tutorial teaches you how to tween the door so that you can replicate it to the door. The tutorial is still relevant in the sense I still use this for myself. It also involves the form of welding as mentioned in the post that @eplcmoon has posted above (I’ve rewatched this and can confirm it uses the same method).