#How do I Make My FPS Viewmodel Play an Anim when i walk
27 messages · Page 1 of 1 (latest)
Is the "If humanoid.MoveDirection.Magnitude > 0 then" the correct way to do this also
where is your viewmodel?
do you mean like a fake pair of arms that the player sees whilst in first person?
Y3W
yes
also it is called M1 Garand
Im not sure theres anything incorrect about the script
oh damn it doesnt upload like a real video
practically all it does is sit in the same spot
the viewmodel is at the side of the image
or do you mean the actual way it looks
its in a loop, you're constantly playing the track
make it play once (make the animation looped also, with priority to movement)
do you have any ideas on how i could fix that problem
debouncing
I have no clue how i would debounce that
ive never done anything animation related
so this is a first
@flint ivy would you possibly know how to do that?
because im confused on how id use debounce to only play it once
ill do a quick example rn
local RunService = game:GetService("RunService")
local anim = Instance.new("Animation") -- your anim or whatever
local hum = Instance.new("Humanoid") -- your hum or whatever
local playing = false
RunService.RenderStepped:Connect(function()
if hum.MoveDirection.Magnitude > 3 and playing == false then
playing = true
anim:Play(0)
elseif playing == true and hum.MoveDirection.Magnitude <= 3 then
playing = false
anim:Stop(0)
end
end)
basic example