Hello Developers,
I am trying to make an animation with moon animator that invovles manipulating parts in the workspace. Everything is fine with the animation but I can’t figure out how to make in run in roblox.
I want to make it so that when the animation is activated, the players animation plays and then the parts in game that I have animated also move with it. But I can’t seem to find a way to connect the parts to the script.
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://125386344850982"
local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)
local animTrack = animator:LoadAnimation(animation)
local function playAnimation()
animTrack:Play()
end
game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.E then
playAnimation()
end
end)
I’ve done some research on how to connect them, but the only thing that comes up is saying to manually animate it via scripts:
Unfortunately, Moon Animator does not support exporting part animations directly into Roblox Animation IDs. Instead, follow this approach:
1. In Moon Animator, open the timeline for your part.
2. Manually record the keyframe CFrames (position & rotation).
3. You’ll need to apply these CFrame values manually in the script
But this seems rather tedious and Im looking for an alternative sollution.
Any help is appreciated!