Like i just made a animation of a saw in moon animator 2, and when the animation is done the saw gets back to it’s place, is there a way to make it play the animation, and make the saw stay the place it goes at the end of the animation??
Yes, you can make the saw stay in the place where it ends up at the end of the animation in Roblox. One way to do this is to use the “SetPrimaryPartCFrame” method to set the CFrame of the saw’s primary part to the CFrame it ends up in at the end of the animation.
Here is some code for an example
`-- Get references to the saw object and the animation object
local saw = game.Workspace.Saw
local animation = saw.AnimationController.Animation1
-- Play the animation
animation:Play()
-- Function to set the CFrame of the saw's primary part to the final CFrame of the animation
local function setFinalCFrame()
-- Get the final CFrame of the saw's primary part
local finalCFrame = saw.PrimaryPart.CFrame
-- Set the CFrame of the saw's primary part to the final CFrame
saw:SetPrimaryPartCFrame(finalCFrame)
end
-- Wait for the animation to finish playing and set the final CFrame
animation.Stopped:Connect(setFinalCFrame)
`
^
Is not tested BTW
let me know if it worked, and send over any errors if you get any