My object tweens wired?
So I want my lever to go up and down but it twists then goes up and down what is the problem here
Vid link: https://streamable.com/cejhwu
script:
01 | local bar = script.Parent.Bar |
02 | local cd = script.Parent.Bar.ClickDetector |
03 | local ts = game:GetService( "TweenService" ) |
04 | local ti = TweenInfo.new( |
06 | Enum.EasingStyle.Linear, |
07 | Enum.EasingDirection.Out, |
13 | local pulleddown = script.Parent.pulled.Value |
14 | local Positions = script.Parent.Positions |
15 | local uppos = { CFrame = CFrame.new(Positions.uppos.Position) } |
16 | local downpos = { CFrame = CFrame.new(Positions.downpos.Position) } |
17 | local up = ts:Create(bar,ti,uppos) |
18 | local down = ts:Create(bar,ti,downpos) |
19 | local re = game.ReplicatedStorage.lockdown |
20 | local function pulled() |
21 | if pulleddown = = false |
26 | elseif pulleddown = = true then |
31 | cd.MouseClick:Connect(pulled) |