I want the animation to immediately be in the position of the animation I had prepared instead of it transitioning from the original model position (if that’s what you call it) to the animation pose
As I said above the model transitions from its original position of the model to the animation pose
I already have tried looking for a solution on this site earlier but there may be one but I haven’t found it yet
here’s the code i am using and the module script if it could do any help
LocalScript
local Viewmodel = game.ReplicatedStorage:WaitForChild("Default"):Clone()
local M13 = game.ReplicatedStorage:WaitForChild("M-13"):Clone()
local AX_50 = game.ReplicatedStorage:WaitForChild("AX-50"):Clone()
local Anim = game.ReplicatedStorage:WaitForChild("Animations")
local MainModule = require(game.ReplicatedStorage.ModuleScript)
Viewmodel.Parent = game.Workspace.Camera
game:GetService("RunService").RenderStepped:Connect(function(Dt)
MainModule.update(Viewmodel, Dt)
end)
game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.One then
M13.Parent = Viewmodel
Viewmodel.AnimationController.Animator:Destroy()
local Animator = Instance.new("Animator")
Animator.Parent = Viewmodel.AnimationController
local Animation = Anim["M13 anim"].Idle
Animation.AnimationId = "rbxassetid://11809783468"
local AnimationTrack = Viewmodel.AnimationController:LoadAnimation(Animation)
AnimationTrack:Play()
if Viewmodel:FindFirstChild("AX-50") then
Viewmodel:FindFirstChild("AX-50").Parent = game.ReplicatedStorage
end
local M6D = Viewmodel.HumanoidRootPart.Handle
M6D.Parent = Viewmodel.HumanoidRootPart
M6D.Part0 = Viewmodel.HumanoidRootPart
M6D.Part1 = M13.Components.Handle
elseif input.KeyCode == Enum.KeyCode.Two then
AX_50.Parent = Viewmodel
Viewmodel.AnimationController.Animator:Destroy()
local Animator = Instance.new("Animator")
Animator.Parent = Viewmodel.AnimationController
local animation = Anim["AX-50 anim"].Idle
animation.AnimationId = "rbxassetid://11809782293"
local AnimationTrack = Viewmodel.AnimationController:LoadAnimation(animation)
AnimationTrack:Play()
if Viewmodel:FindFirstChild("M-13") then
Viewmodel:FindFirstChild("M-13").Parent = game.ReplicatedStorage
end
local M6D = Viewmodel.HumanoidRootPart.Handle
M6D.Part0 = Viewmodel.HumanoidRootPart
M6D.Part1 = AX_50.Components.Handle
end
end)
ModuleScript
local module = {}
function module.update(viewmodel, dt)
viewmodel.HumanoidRootPart.CFrame = game.Workspace.Camera.CFrame
end
return module
Thank you if you guys have helped me find a fix