People who are lazy to type GameMgr Script: local crouchAnim = script:WaitForChild("Crouch") game.Players.PlayerAdded:Connect(function(player) player.CharacterAppearanceLoaded:Connect(function(char) local hum = char:WaitForChild("Humanoid") local animator = hum:WaitForChild("Animator") for i, v in pairs(animator:GetPlayingAnimatorTracks()) do v:Stop(0) end local animScript = char:WaitForChild("Animate") animScript.walk.WalkAnim.AnimationId = crouchAnim.AnimationId end) end) CrouchLoc LocalScript: local uis = game:GetService("UserInputService") local char = script.Parent local hum = char:WaitForChild("Humanoid") local hrp = char:WaitForChild("HumanoidRootPart") local runSnd = hrp:WaitForChild("Running") local isCrouch = false local vol = runSnd.Volume local pbs = runSnd.PlaybackSpeed local animator = hum:WaitForChild("Animator") local crouchIdle = script:WaitForChild("CrouchIdle") local track = animator:LoadAnimation(crouchIdle) uis.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.V then isCrouch = not isCrouch if isCrouch then track:Play() hum.WalkSpeed = 5 runSnd.PlaybackSpeed = 1 runSnd.Volume = .25 else track:Stop() hum.WalkSpeed = 16 runSnd.PlaybackSpeed = pbs runSnd.Volume = vol end end end) hum.Running:Connect(function(speed) if speed > 0 then track:Stop() elseif isCrouch and speed == 0 then track:Play() end end) I was typing it 1 hour tyysmm for this video!!!!!!!!!!!!!!!!!!!!!!!!!!!!! these are working all tysm bro!!
I needed this, thank you. I will suggest for maybe future videos maybe making some sort of spiderman system because I really want to know more about physics in roblox studio.
Hi, I'm having an issue with roblox studio, I can't move an object while I'm in the animator, pressing the R key to switch between tools doesn't work either, google hasn't been helpful :/
I can’t find the published button. I can see “Delete Local Instances” and it says “We recommend that you delete the local animation data to improve your experience’s loading performance. You will always be able to reimport the animation to continue working on it”.
I got one question tho. you set the walkinganimation to the crouching animation. But what happened if the player decides to walk regularly will it play the crouching animation automatically.
If you break the speed threshold to the walk it’ll go to crouch. If you don’t want that, you’d need another way of doing it. But Roblox is flexible so there are many ways. You can give the crouch action priority and just trigger it with an input event if you want to.
hey, good guy! can i get a script please? I believe you so much at scripting! And also, im getting orange line at line 6. with hum problem, it says it never can be at that place, where i can change it to?
does it matter exactly what the action priority is and if i didnt keep it looped ?because i have mine set to Action and i didnt loop it . and its not working , ive watched like 4 tutorial vids
bro your vids are actually so peak ive been looking for sooo many vids and yours are the only that works thx
Aw thanks man! That’s a hard one!
People who are lazy to type
GameMgr Script:
local crouchAnim = script:WaitForChild("Crouch")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAppearanceLoaded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
for i, v in pairs(animator:GetPlayingAnimatorTracks()) do
v:Stop(0)
end
local animScript = char:WaitForChild("Animate")
animScript.walk.WalkAnim.AnimationId = crouchAnim.AnimationId
end)
end)
CrouchLoc LocalScript:
local uis = game:GetService("UserInputService")
local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local hrp = char:WaitForChild("HumanoidRootPart")
local runSnd = hrp:WaitForChild("Running")
local isCrouch = false
local vol = runSnd.Volume
local pbs = runSnd.PlaybackSpeed
local animator = hum:WaitForChild("Animator")
local crouchIdle = script:WaitForChild("CrouchIdle")
local track = animator:LoadAnimation(crouchIdle)
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.V then
isCrouch = not isCrouch
if isCrouch then
track:Play()
hum.WalkSpeed = 5
runSnd.PlaybackSpeed = 1
runSnd.Volume = .25
else
track:Stop()
hum.WalkSpeed = 16
runSnd.PlaybackSpeed = pbs
runSnd.Volume = vol
end
end
end)
hum.Running:Connect(function(speed)
if speed > 0 then
track:Stop()
elseif isCrouch and speed == 0 then
track:Play()
end
end)
I was typing it 1 hour tyysmm for this video!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
these are working all tysm bro!!
thank you for this
I needed this, thank you. I will suggest for maybe future videos maybe making some sort of spiderman system because I really want to know more about physics in roblox studio.
That’s an interesting idea!
Why isnt UIS used in the server side script, this causes the crouch to play even if you don't press a button. This a script error?
Hi, I'm having an issue with roblox studio, I can't move an object while I'm in the animator, pressing the R key to switch between tools doesn't work either, google hasn't been helpful :/
I had that same thing not too long ago. I restarted studio and it worked but there was definitely a glitch
Can you make a tutorial on how to have a NPC follow you but to not get too close?
When i need u the most u appeared thank you so much bro🎉🎉
Awesome! I hope it helps!
@@SimTekGameDevelopment but i have 1 problem it cant go under an smaller object can u help
@@Cody-gw4pq Probably something to do with collisions
Thank you for this!
Thanks for watching man!
I can’t find the published button. I can see “Delete Local Instances” and it says “We recommend that you delete the local animation data to improve your experience’s loading performance. You will always be able to reimport the animation to continue working on it”.
scroll down bruh or move the window up
script starts at 7:36 , hope this works for yall !
my crouch doesnt work... i think its clashing with my idle walking animation
Great video!!! I accidentally put the local script in starter player instead of starter character lol.
@@DLHDLH-lp4po dude that’s a hard one, if you got that working you got some good skills!
OOH maybe make a game like left 4 dead like a series
i found a bug, if you have the sprint script and the crouch script, you dont slow down
that's for you to solve, make an if statment to check if the player is sprinting/crouching
I got one question tho. you set the walkinganimation to the crouching animation. But what happened if the player decides to walk regularly will it play the crouching animation automatically.
If you break the speed threshold to the walk it’ll go to crouch. If you don’t want that, you’d need another way of doing it. But Roblox is flexible so there are many ways. You can give the crouch action priority and just trigger it with an input event if you want to.
I thought about doing that way for the video. I just picked that way.
hey, good guy! can i get a script please? I believe you so much at scripting! And also, im getting orange line at line 6. with hum problem, it says it never can be at that place, where i can change it to?
the crouch system works but the animation doesnt work, im using r6! any help?
I think you have to use the R15 instead
when i tried my animation wouldnt work
work with R6?
the crouching animation didnt play for me
Prob you need to make your own crouching animation
@@ItzNotGueststill doesn't play
Wassup!
what up
Wassup Sobia!
WHY SO LESS LIKES?!?!?
can this be done with r6?
No
Bro top work please make a maniquin members can edit ingame adding there own 😢😂 ill pay make discord
My animation is not playing
no shit it might be out dated
nahh it not. it worked for me but not r6
this took too long
yay mama im first
Nice! Thanks man!
@@SimTekGameDevelopment AWESOME VIDEO btw you even showed use how to make the animations!
Yay am 2nd
Aw nice man!
10th
does it matter exactly what the action priority is and if i didnt keep it looped ?because i have mine set to Action and i didnt loop it . and its not working , ive watched like 4 tutorial vids
it only slows down when i click V thats it
action priority does matter.
Hey man! I'd love to connect via Facebook! Already send you a dm.
Why isnt UIS used in the server side script, this causes the crouch to play even if you don't press a button. This a script error?