What do you want to achieve? That my tween plays
What is the issue? It’s not playing the tween
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 doorTweenInfo = TweenInfo.new(1,Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0)
local TweenService = game:GetService('TweenService')
Door.ProximityPrompt.Triggered:Connect(function(hit)
TweenService:Create(Door.openDoor, doorTweenInfo, {CFrame = Door.openDoora.CFrame}):Play()
warn( "Test ")
It does give the warn
Let me know if you can help!
1 Like
pwrcosmic
(pwrcosmic)
January 25, 2022, 6:34pm
#2
Is the openDoora CFrame at the same position as the Door.openDoor CFrame? If so, the tween is technically playing, it’s just finishing immediately.
No its not in the same position
pwrcosmic
(pwrcosmic)
January 25, 2022, 6:36pm
#4
Consider defining the tween as a variable, setting up a .Completed connection with that variable, play the tween, then see what happens. If it completes, then something is up with your CFrames. If nothing happens, then there’s something wrong with the Tween setup itself.
How do you think I should make the CFrame work (Because I put a warn after it should have done it and the warn came in my output)
EDIT: Should I give the whole script?
pwrcosmic
(pwrcosmic)
January 25, 2022, 6:42pm
#6
Giving the whole script may not be necessary, but the more information the better.
The hierarchy and the data associated with the two parts would probably be more helpful.
Also, is openDoor the door itself or the intended position? Make sure you dont mix them up.
The openDoor is in the intended position. I’ll give you the whole script because nothing else is about tweeting but something may be interfering
Whole Script
local waitForProx = 1
local isTouched = false
local Door = script.Parent
local doorTweenInfo = TweenInfo.new(1,Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0)
local TweenService = game:GetService('TweenService')
Door.ProximityPrompt.Triggered:Connect(function()
TweenService:Create(Door.openDoor, doorTweenInfo, {CFrame = Door.openDoor.CFrame}):Play()
warn( "Test ")
game.ReplicatedStorage.bankDetector.Parent = script.Parent.Parent
script.Parent.ProximityPrompt.Parent = game.ReplicatedStorage
script.Parent.Parent.bankDetector.Touched:Connect(function()
if not isTouched then
isTouched = true
script.Parent.CanCollide = true
script.Parent.Transparency = 0
game.ReplicatedStorage.ProximityPrompt.Parent = script.Parent
script.Parent.Parent.bankDetector.Parent = game.ReplicatedStorage
wait(waitForProx)
isTouched = false
end
end)
end)
pwrcosmic
(pwrcosmic)
January 25, 2022, 6:47pm
#8
From what you’ve posted, you’re telling the initial position to move to itself. Make sure that the Door.openDoor is your intended variable at the start of the Tween and not some other part in your model.
1 Like
I’ve fixed it. I didn’t realize that I set openDoor as start.