I was making a blade pendulum for a update of my game, but there are some parts that just stop following the base part of the pendulum, I have made this script for the model:
local base = script.Parent.Base
local arm = script.Parent.Arm
local blade = script.Parent:WaitForChild("Blade")
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1,Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local swing = {
CFrame = base.CFrame * CFrame.Angles(math.rad(25), 0, 0)
}
local swing2 = {
CFrame = base.CFrame * CFrame.Angles(-math.rad(25), 0, 0)
}
local tween = tweenService:Create(base, tweenInfo, swing)
local tween2 = tweenService:Create(base, tweenInfo, swing2)
while wait() do
tween:Play()
tween.Completed:Wait()
tween2:Play()
tween2.Completed:Wait()
end
And here is the example of what is happening: