Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My script is working, but the tween doesn't play, can I please get some help?

Asked by 4 years ago
Edited 4 years ago

local doorModel = script.Parent

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

local doorTween = TweenService:Create(doorModel.DoorClosed, doorTweenInfo, {CFrame = doorModel.DoorOpen.CFrame})

doorModel.Square.Touched:Connect(function(hit) if hit.Name == "Key" and hit.BrickColor == doorModel.Square.BrickColor then doorModel.Square.Transparency = 0 hit:Destroy() end end)

doorModel.Triangle.Touched:Connect(function(hit) if hit.Name == "Key" and hit.BrickColor == doorModel.Triangle.BrickColor then doorModel.Triangle.Transparency = 0 hit:Destroy() end end) doorModel.Circle.Touched:Connect(function(hit) if hit.Name == "Key" and hit.BrickColor == doorModel.Circle.BrickColor then doorModel.Circle.Transparency = 0 hit:Destroy() end end)

if doorModel.Circle.Transparency == 0 and doorModel.Square.Transparency == 0 and doorModel.Triangle.Transparency == 0 then
   doorTween:Play()
end 

``~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~ `` The final door tween doesn't work for some reason, I have tried changing up a couple of other stuff but it still wont work

0
Sorry but I am not able to read the code that well without the code structure, what you need to do to make it in code structure is put the code between the two code blocks or lines. SprinkledFruit101 135 — 4y

Answer this question