Why is my Tween not playing?

  1. What do you want to achieve? That my tween plays

  2. What is the issue? It’s not playing the tween

  3. What solutions have you tried so far? I’ve tried looking it up but I couldn’t find anything

This is not the whole script

local Door = script.Parent

local TweenService = game:GetService('TweenService')
local doorTweenInfo = TweenInfo.new(1,Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0)

local doorTween = TweenService:Create(Door.openDoor, doorTweenInfo, {CFrame = Door.openDoora.CFrame})

script.Parent.ProximityPrompt.Triggered:Connect(function(hit)
	doorTween:Play()

I hope someone can help!

Did you forgot to put the end) statement at the end of your fonction ?

The tween looks fine, however, it’s hard to tell what Door.openDoor or Door.openDoora is. I’m assuming these are fixed parts within your model that act as an origin and an end goal CFrame.

Have you tried checking if the proximityprompt is the issue? Place a warn(“Test”) underneath and if you don’t see the “Test” text in output then it’s most likely the proximityprompt causing errors.

It could also be welds connected to the door. Make sure the thing you are tweening is anchored and not welded to anything. (WeldConstraints should be fine though)

nope i didn’t forget to do that

It’s not welded to anything and its anchored and I see Test In the output

1 Like

Hmm, try replacing that code with this:

local Door = script.Parent

Door.ProximityPrompt.Triggered:Connect(function(hit)
	TweenService:Create(Door.openDoor, doorTweenInfo, {CFrame = Door.openDoora.CFrame}):Play()
end)

Nope it’s still not working sadly

Door.openDoor, doorTweenInfo, {CFrame = Door.openDoora.CFrame}

“Door.openDoor” then “Door.openDoora”, I’m going to assume the latter is a typo.

Have you anchored your door? I came across this issue fairly often.

@TheGameGod_YT
THe problem is that you use Door.position instead or Door.Cframe, for some reason roblox does not like tweening Position, please mark this as an answer if it helped you.

2 Likes