Hello guys !
I want to know if we can tween an attachment
I want to tween the part like this in the video
can someone help me ?
if you guys can help me i’ll appreciate it ![]()
Hello guys !
I want to know if we can tween an attachment
I want to tween the part like this in the video
can someone help me ?
if you guys can help me i’ll appreciate it ![]()
If you want to tween the attachment to move the part you can say
local changValue = Instance.new("CFrameValue")
You’ll use it to make a changed event which will replicate onto the part, but you’ll be tweening the attachment.
actually I dont want to tween the attachment, but i guess its the best way to do what I shown in the video ?
Hello! Try this:
local part = script.Parent -- This is if the script is inside of the primary part of the model
-- Or if you want it inside the model then just use "script.Parent.Chapter" and that's all.
local TweenService = game:GetService("TweenService")
-- CFrames
local CFrameUp = CFrame.new(0, 0, 0) -- Replace with your desired CFrame
local CFrameDown = CFrame.new(0, 0, 0) -- Replace with your desired CFrame
-- Tweens
local TweenUp = TweenService:Create(part, TweenInfo.new(1), {CFrame = CFrameUp})
local TweenDown = TweenService:Create(part, TweenInfo.new(1), {CFrame = CFrameUp})
-- If you want it to be a loop:
TweenUp:Play()
TweenUp.Completed:Connect(function()
wait(1) -- Change the time
TweenDown:Play()
end)
TweenDown.Completed:Connect(function()
wait(1) -- Change the time
TweenUp:Play()
end)
It’s not that good since i didn’t write it on studio, it’s all mind-made.
Hope it helps!