local dragpart = workspace.Filter.DragTask
local unlock = script.Parent
local TS = game:GetService("TweenService")
local isAnim = false
local debounce = false
local ray = workspace:Raycast(dragpart.Position, dragpart.CFrame.upVector * -150)
if ray then
if ray.Instance.Name == "unlock" and not debounce then
debounce = true
local tween = TS:Create(unlock, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = Vector3.new(-47, 0.579, 14)})
tween:Play()
tween.Completed:Wait()
debounce = false
else
if debounce == true then
local tween = TS:Create(unlock, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = Vector3.new(-47, 1.281, 14)})
tween:Play()
tween.Completed:Wait()
debounce = false
end
end
end
#dragPart not causing the tween to happen
1 messages · Page 1 of 1 (latest)