Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

TweenService isn't moving my Union, however there is not output error?

Hi,

I am attempting to use TweenService to create a sliding door. The sliding door is a singular union, with the script inside of it. I have used the following code:

local TweenService=game:GetService("TweenService")
local Door=script.Parent
local DoorOpen={CFrame=CFrame.new(-24.261, 55.363, -13.69)}
local DoorClose={CFrame=CFrame.new(-24.261, 75.363, -13.69)}
local Db=false

local tweenInfo = TweenInfo.new(20, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1, true, 2)

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and Db==false then
		Db=true
		TweenService:Create(Door,tweenInfo,DoorOpen)
	end
end)

There is no errors in the output, however the door refuses to move. Any ideas?

1 answer

✓ Accepted answer

Add a :Play() at the end of line 12.

1 comment

0

Thanks! Knew it'd be a silly mistake.

This discussion is preserved as it was. New answers, comments, and votes are closed.