For those having sound delay, you have to create instances for each Sound, preload them with PreloadAsync, save in the replicatedStorage, clone and then use it as the script already does
ATTENTION! anyone adding this to their projects, the new animator script doesnt have support for emotes AND sitting, your character cant sit with this new animator... also it causes one err in the console, something about rbxCharacterSounds not being able to find a sound with some improvements adressing this tho, good job gnome
Nice video, your tutorials are very informational and helpful! If you can could you make a video explaining the changes in the collision groups? Thanks!
hey lads! I encountered a very strange bug relating to this code. I won't go over it, but if you are using this code and find you characters do not do a sit animation, you need to code in a sitanim that has a higher animation priority than the run animation. It took me almost a week to figure that out! I was so confused!
Nice stuff! I have a question tho, can this be done in R6? Since my game is already kind of based in R6 but a detail like this would make it so much better.
video was really helpful and useful, but i mainly use r6, instead of asking for a version of this script that works for r6, i decided to tinker with the original r15 script and managed to get it to r15 and r6, thing is though, in order to use the script in a game that supports both rig types, is that your gonna have to have a duplicate of the script with custom animations for both r15 and r6, and another script that enables the correct script depending on the humanoid's rig type edit: thanks to gnome's raycasting tutorial, i was able to alter the footprint positioning entirely, and has more accurate placing (and will also auto-color) the footprint to match the color of the ground below, it will also allow for use of multiple materials at once (like 1 foot on sand, while the other is on diamond plate) gnome code and other coding tutorial youtubers, motivate me to keep coding and edit code to try new things
@@drinktherot btw its just the animation script, it doesnt come with any footstep models just wanted to let you know, so you dont wonder why it has no footstep models
I hate to bug you but would you be able to put the scripts for both the r6 and r15 aswell as the script that will enable the correct script depending on the humanoids rig type i also prefer r6 but no matter what i do i cant get it to work please and thank you and if not i could work with just the r6 ive already got my own animations and everything
@@emperorN if you just want the sounds working in r6 just go into the script and find the OnFootStep function, and where it says "local foot = character:FindFirstChild(side.. "Foot")", change the (side.. "Foot) to (side.. " Leg"). and make sure there is a space before leg, since the name for the character's name uses a space. lmk if it works or not
This is great- Performance question - for sounds that you are playing so frequently like footsteps, is it more performant to not be instancing them and then destroying them over and over? Is it optimal to have them sitting in workspace to be played for example? Or you find it is not a big deal?
The problem with having a single sound instance is if you want to have two sounds playing at the same time (Such as quick footsteps). By creating a new instance, it allows the last footstep sound to finish and the next to begin without having to stop each other (If you were overwriting IDs).
@@GnomeCode I know that this is an older comment, but maybe a solution would be blacklisting the last played sound, so the same footstep sound doesn't play twice in a row. Would both make it more realistic and would probably allow you to use single sound instances since realistically you probably won't take 2 more steps in the time it takes the first sound to finish playing.
That's really interesting and who knows what you can do with it. I will add it to my big project and we will see what happen at the end :) i love this idea. Thanks for the video !
Nice tutorial! I'm sure you're the only one who takes lots of time for that. How do I make it compatible with scripts that load other animations? (example:Crouch)
I can't play any other animations with this script enabled since all the animations are being controlled by the script and not by the default animator, can you make a version of this script that only handles the walk animations? or tell me how I can modify your code.
@@sincostine i just changed it to not play any animation and fire the on footstep event when the player's foot touches the ground, but this presents its own problems like a rapid bombardment of footsteps when walking into a wall. Im still looking for a good solution
cool idea in concept, but perhaps this is just too old now. breaks sitting, tools, emotes, all kinds of stuff, so i wouldn't recommend anyone trying to use it as is. but i did learn enough to edit the original Animate script to make it do what i wanted.
Great job on this code. Very helpful! When I implement it I get a skipping. Not every footstep event is sent perhaps? Sometimes the character step has no sound. Sometimes it fires off two sounds, like the character is skipping.
@@artene1189 not sure if you still need this but i copied the sound ids from the module script "footsteps" and put them all into a folder "sounds" in workspace this makes it so all footstep sounds are preloaded, thus less delay
Very late comment but I fixed the script because it wouldn't play the sitting animation. Copy my code and replace the 'Animate2' script, but leave 'Footsteps' as is: local Debris = game:GetService("Debris") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local character = script.Parent local humanoid = character:WaitForChild("Humanoid") local root = character:WaitForChild("HumanoidRootPart") local animator = humanoid:WaitForChild("Animator") local footprintFolder = ReplicatedStorage:WaitForChild("Footprints") local footsteps = require(script:WaitForChild("Footsteps")) local lastFootstepSound = nil local animTracks = {} local transitionTime = 0.2 local jumpAnimTime = 0 local holdingTool = false local function StopAllAnimations(ignoreName) for i, animTrack in pairs(animator:GetPlayingAnimationTracks()) do if animTrack.Name == ignoreName or (ignoreName == "Run" and animTrack.Name == "Walk") or (holdingTool and animTrack.Name == "Tool") then continue end animTrack:Stop(transitionTime) end end local function AdjustAnimation(name, speed, weight) animTracks[name]:AdjustSpeed(speed) animTracks[name]:AdjustWeight(weight) end local function PlayAnimation(name, speed, weight) animTracks[name]:Play(transitionTime) AdjustAnimation(name, speed, weight) StopAllAnimations(name) end local function Running(speed) if speed > 0.5 then
local relativeSpeed = speed / 16 local runAnimWeight, walkAnimWeight = 0.001, 0.001 if relativeSpeed < 0.5 then -- Walking speed walkAnimWeight = 1 elseif relativeSpeed < 0.9 then -- Blend run and walk local fadeInRun = (relativeSpeed - 0.5)/(1 - relativeSpeed) walkAnimWeight = 1 - fadeInRun runAnimWeight = fadeInRun relativeSpeed = 1 else -- Simply run runAnimWeight = 1 end
if animTracks["Run"].IsPlaying then if speed > 0.5 then AdjustAnimation("Walk", relativeSpeed, walkAnimWeight) AdjustAnimation("Run", relativeSpeed, runAnimWeight) end else PlayAnimation("Walk", relativeSpeed, walkAnimWeight) PlayAnimation("Run", relativeSpeed, runAnimWeight) end else PlayAnimation("Idle") end end local function Jumping() jumpAnimTime = 0.31 PlayAnimation("Jump") end local function Falling() if (jumpAnimTime 1 then local relativeSpeed = speed / 10 if animTracks["Swim"].IsPlaying then AdjustAnimation("Swim", relativeSpeed, 1) else PlayAnimation("Swim", relativeSpeed) end elseif not animTracks["SwimIdle"].IsPlaying then PlayAnimation("SwimIdle", 1) end end local function Sitting() if humanoid:GetState() == Enum.HumanoidStateType.Seated then PlayAnimation("Sit", 1) else StopAllAnimations("Sit") end end local function PlayFootstepSound(foot, material) if not foot then return end local sounds = footsteps.sounds[material] if not sounds then return end local random = Random.new() local soundId = sounds[random:NextInteger(1, #sounds)] if soundId and soundId ~= lastFootstepSound then lastFootstepSound = soundId local sfx = Instance.new("Sound") sfx.SoundId = soundId sfx.RollOffMaxDistance = 100 sfx.RollOffMinDistance = 10 sfx.Volume = footsteps.volume[material] or 0.5 sfx.Parent = foot sfx:Play() task.spawn(function() sfx.Ended:Wait() sfx:Destroy() end) else PlayFootstepSound(foot, material) end end local function OnFootStep(side) local foot = character:FindFirstChild(side.."Foot") local floorMaterial = humanoid.FloorMaterial local material = footsteps.materialMap[floorMaterial] PlayFootstepSound(foot, material) if material then local footprint = footprintFolder:FindFirstChild(material) if footprint then footprint = footprint:Clone() footprint:PivotTo(foot.CFrame * CFrame.new(0, -footprint.PrimaryPart.Size.Y, 0)) footprint.Parent = workspace Debris:AddItem(footprint, footsteps.decay[material] or 3) end end end function LoadAnimations() local animationIDs = { Climb = "rbxassetid://10921257536", Fall = "rbxassetid://10921262864", Idle = "rbxassetid://10921258489", Jump = "rbxassetid://10921263860", Run = "rbxassetid://15057664037", -- My custom anim: 11096667011 Walk = "rbxassetid://10921269718", Swim = "rbxassetid://10921264784", SwimIdle = "rbxassetid://10921265698", Tool = "rbxassetid://507768375", Sit = "rbxassetid://2506281703" } local defaultAnimateScript = character:WaitForChild("Animate", 3) if defaultAnimateScript then defaultAnimateScript:Destroy() end for name, id in pairs(animationIDs) do local animation = Instance.new("Animation") animation.AnimationId = id local track = animator:LoadAnimation(animation) animTracks[name] = track animTracks[name].Name = name if name == "Idle" then animTracks[name].Priority = Enum.AnimationPriority.Idle elseif name == "Run" or name == "Walk" or name == "Climb" then animTracks[name].Priority = Enum.AnimationPriority.Movement elseif name == "Tool" or name == "Jump" --[[or name == "Fall"]] then animTracks[name].Priority = Enum.AnimationPriority.Action end end animTracks["Idle"]:Play() humanoid.Running:Connect(Running) humanoid.Jumping:Connect(Jumping) humanoid.FallingDown:Connect(Jumping) humanoid.FreeFalling:Connect(Falling) humanoid.Climbing:Connect(Climbing) humanoid.Swimming:Connect(Swimming) humanoid.Seated:Connect(Sitting) -- Custom animation with keyframe marker required for this to work if animationIDs.Run ~= "rbxassetid://10921261968" then local oldRunSound = root:WaitForChild("Running") oldRunSound:Destroy() animTracks["Run"]:GetMarkerReachedSignal("Footstep"):Connect(OnFootStep) end end LoadAnimations() RunService.Heartbeat:Connect(function(deltaTime) if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end
local tool = character:FindFirstChildOfClass("Tool") if tool and tool:FindFirstChild("Handle") then holdingTool = true if not animTracks["Tool"].IsPlaying then animTracks["Tool"]:Play(transitionTime) end else holdingTool = false animTracks["Tool"]:Stop(transitionTime) end end)
THIS GUY IS STALKING ME I SWEAR TO GOD: FIRST I WANT TO MAKE A DOORS GAME THEN I REALIZE HE MADE A VID FOR IT THE DAY BEFORE, THEN I NEED TO LEARN TWEEN SERVICE FOR MY NEW GAME AND HE MAKES A VID ON THAT, AND NOW THAT I NEED FOOTSTEP SOUNDS THERES THIS TOO! WHAT Edit: JUST REALIZED HE ADDED FOOTPRINTS TOO WHICH I ALSO NEEDED
Great video and I love the footsteps. However there is a issuse with them, when I join the actual game through roblox and not studio I can't hear them even when I've saved the game and published to roblox.
Sounds only work in roblox if the owner of the sound you're attempting to use matches the owner of the game. For example: If the game belongs to you, the sound has to be published by you, and if a group owns the game, the sound must be published by the group.
Only roblox scripting tutorials force me to lower the volume of every other application by 99% just to hear a crappy mic that might as well be in another room
This is very nice and high quality but the delay is a thing. Also, OTHER ANIMATIONS STOP WORKING. I know its fixable but I personally lack the knowledge and don't seem to get on the right track with numerous hours and attempts put into it. If anyone here would like to help then please let me know 🙏
Hey, I appreciated you for making a tutorial. One problem that I'm struggled with is that how can I fix the sitting animation, it completely broke for reason. Hope you respond.
How can I do to make the script work also with the walking animation? I made a custom run animation, and I'm using the default walking r15 animation, but I tried saving it with the animation events the same way you did with the run animation. The sounds get slower when I walk, but they still don't fit, that's why I'm trying to do it manually.
this man just gives away a whole freaking thing that makes a game 100% better and he acts like its nothing. SHOUTOUT TO THIS MAN!!! +1 sub
For those having sound delay, you have to create instances for each Sound, preload them with PreloadAsync, save in the replicatedStorage, clone and then use it as the script already does
Hi, I'm really new to Roblox. I've been looking alot to Preload these Footsteps. Can't find how to do it! Can you help please?
what does preload mean?
But how?
@@thesillylevelsewever by scripting
Does this work with R6 for other people? I tried doing this exact method with R6 but then I hear no footsteps.
ATTENTION!
anyone adding this to their projects, the new animator script doesnt have support for emotes AND sitting, your character cant sit with this new animator...
also it causes one err in the console, something about rbxCharacterSounds not being able to find a sound
with some improvements adressing this tho, good job gnome
For those who are having trouble with rig animator just copy the animation ID in the video don't copy the one that is in your character when you play
Hell yeah brother, gonna use and learn from this!!
Turns out the footstep animation isnt available anymore.
Perfect just what I needed to make my game!
i literally opened my youtube to search for a tutorial on how to do something like that, and your video pops up. Simply unbelievable!
Small issue: When I start running some footsteps will spawn mid-air. The speed didn't change much the issue was still there.
Nice video, your tutorials are very informational and helpful! If you can could you make a video explaining the changes in the collision groups? Thanks!
This is really cool GnomeCode! I love these little videos like this
gnome code is literally the holy grail of devving youtubers
You should make a Christmas sale for the Merch store! Good video!
You mean price increase :trollGnome:
@@ChristopherThePiss you mean price decrease
@@JJKaddict no, increase
A increase would mean that the price will grow higher a sale is where the price decreases
hey lads! I encountered a very strange bug relating to this code. I won't go over it, but if you are using this code and find you characters do not do a sit animation, you need to code in a sitanim that has a higher animation priority than the run animation. It took me almost a week to figure that out! I was so confused!
Thankss. The footsteps make the ambience way better.
Thank you so much! Now I can add custom walking sounds to my backrooms game and maybe some others!
Crazy how many useful things you give away for free. I don't know if i need any of this rn but it could all come in useful later. Thank you!
This will be perfect for my doors game, thanks gnome!
I think it would be really cool if you could make it so the footsteps are more quiet the slower you are going.
Thats a good idea
Just make the volume of the footstep sound relative to the humanoid's walkspeed
took me about an hour to do cus i wa having some problems with rig animator but everything works as it should
now tysm for the tut
So thankful Thank you man you deserve a subscriber
What an interesting video! Ill be sure to implement this into my projects
TYSM man this really helped out
FYI, it sounds better when you set the animation speed at 0.5x
thanks man you just helped me making my game❤️❤️
Nice stuff! I have a question tho, can this be done in R6? Since my game is already kind of based in R6 but a detail like this would make it so much better.
Thank you very much! this helped me out a LOT! earned a new sub :)
when he said over 800 lines my heart sank. Its hard for me to right 6 lines without taking a break
video was really helpful and useful, but i mainly use r6, instead of asking for a version of this script that works for r6, i decided to tinker with the original r15 script and managed to get it to r15 and r6, thing is though, in order to use the script in a game that supports both rig types, is that your gonna have to have a duplicate of the script with custom animations for both r15 and r6, and another script that enables the correct script depending on the humanoid's rig type
edit: thanks to gnome's raycasting tutorial, i was able to alter the footprint positioning entirely, and has more accurate placing (and will also auto-color) the footprint to match the color of the ground below, it will also allow for use of multiple materials at once (like 1 foot on sand, while the other is on diamond plate)
gnome code and other coding tutorial youtubers, motivate me to keep coding and edit code to try new things
you think i can get that cause i use r6
@@drinktherot btw its just the animation script, it doesnt come with any footstep models just wanted to let you know, so you dont wonder why it has no footstep models
I hate to bug you but would you be able to put the scripts for both the r6 and r15 aswell as the script that will enable the correct script depending on the humanoids rig type i also prefer r6 but no matter what i do i cant get it to work please and thank you and if not i could work with just the r6 ive already got my own animations and everything
drop da scripttttsssssssssssssss
@@emperorN if you just want the sounds working in r6 just go into the script and find the OnFootStep function, and where it says "local foot = character:FindFirstChild(side.. "Foot")", change the (side.. "Foot) to (side.. " Leg"). and make sure there is a space before leg, since the name for the character's name uses a space. lmk if it works or not
Cool stuff. I'm going to make it per foot & have networked sounds (and footprints while I am at it I guess), because why not.
in many games custom footsteps is needed but in simulators or tycoons or more don't need custom footsteps and it fits to the game.
awesome tutorial man, major ty!
Thanks man appreciate it!
I have a question, when my avatar sits down on a chair, the avatar stands on his feets and is not in sit position, how can i fix that?
Thank you for this video and model/animation
This is great- Performance question - for sounds that you are playing so frequently like footsteps, is it more performant to not be instancing them and then destroying them over and over? Is it optimal to have them sitting in workspace to be played for example? Or you find it is not a big deal?
The problem with having a single sound instance is if you want to have two sounds playing at the same time (Such as quick footsteps). By creating a new instance, it allows the last footstep sound to finish and the next to begin without having to stop each other (If you were overwriting IDs).
@@GnomeCode the footsteps wont work
@@thesillylevelsewever Bro dont care 💀💀
@@crimson-2244 Then why you're talking to him?
@@GnomeCode I know that this is an older comment, but maybe a solution would be blacklisting the last played sound, so the same footstep sound doesn't play twice in a row. Would both make it more realistic and would probably allow you to use single sound instances since realistically you probably won't take 2 more steps in the time it takes the first sound to finish playing.
Bro this is Beautiful
Dude, thank you, i was making a horror game and if i put that sounds in my game the game will gonna to be cool, i need to give you credits?
It worked and I liked it. I am also gonna subscribe.
bro 200 lines i cant do that
1.) if u can’t then learn before making a game
2.) you literally get the code from roblox u don’t even need to code it.
@@not_sambreto Ohhhh
That's really interesting and who knows what you can do with it.
I will add it to my big project and we will see what happen at the end :)
i love this idea.
Thanks for the video !
Thanks it works so well this is a good tutorial
Is there a R6 version? I'd love to know!
It just didn't work for me, I tried multiple times and tried fixing stuff multiple times and searched a bunch on what was wrong but it didn't work.
Nice tutorial! I'm sure you're the only one who takes lots of time for that. How do I make it compatible with scripts that load other animations? (example:Crouch)
I can't play any other animations with this script enabled since all the animations are being controlled by the script and not by the default animator, can you make a version of this script that only handles the walk animations? or tell me how I can modify your code.
Having the same problem, you found any solutions yet?
@@sincostine i just changed it to not play any animation and fire the on footstep event when the player's foot touches the ground, but this presents its own problems like a rapid bombardment of footsteps when walking into a wall. Im still looking for a good solution
@@fort-t70 Thank you for the tip, i'll try and mess around with debounce to see if the rapid footsteps can be fixed
I must do this video it’s amazing.
Where was this video 2 days ago when I needed it?
Epic. Perfect for horror games.
for me its kinda lagging but it works, very cool
This is really nice! Thanks GnomeCode! But what if I am making an R6 Game?
this will help with my horror game
cool idea in concept, but perhaps this is just too old now. breaks sitting, tools, emotes, all kinds of stuff, so i wouldn't recommend anyone trying to use it as is. but i did learn enough to edit the original Animate script to make it do what i wanted.
This is nice and all but you forgot to add the sit animations in your script, thus they are broken,
if you still need help with this, code in a sit anim with higher priority than run. it should fully fix it. /if you have figured that out, dw abt it!
Great job on this code. Very helpful! When I implement it I get a skipping. Not every footstep event is sent perhaps? Sometimes the character step has no sound. Sometimes it fires off two sounds, like the character is skipping.
having a similar problem, lmk if you find a solution
solved this problem by creating a folder with all the footstep sounds so that it's loaded. sounds are played without delay now
@@towlsss how did you do that? I have the same problem but I don't understand what exactly I need to do.
@@artene1189 not sure if you still need this
but i copied the sound ids from the module script "footsteps" and put them all into a folder "sounds" in workspace
this makes it so all footstep sounds are preloaded, thus less delay
Are you continuing the doors series? (Also this was really useful and awesome!)
--[???] Its the person downloading this, this is truly amazing, thanks!
It would be so cool if you made head bobbing with this system!
Very late comment but I fixed the script because it wouldn't play the sitting animation. Copy my code and replace the 'Animate2' script, but leave 'Footsteps' as is:
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local root = character:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
local footprintFolder = ReplicatedStorage:WaitForChild("Footprints")
local footsteps = require(script:WaitForChild("Footsteps"))
local lastFootstepSound = nil
local animTracks = {}
local transitionTime = 0.2
local jumpAnimTime = 0
local holdingTool = false
local function StopAllAnimations(ignoreName)
for i, animTrack in pairs(animator:GetPlayingAnimationTracks()) do
if animTrack.Name == ignoreName
or (ignoreName == "Run" and animTrack.Name == "Walk")
or (holdingTool and animTrack.Name == "Tool") then
continue
end
animTrack:Stop(transitionTime)
end
end
local function AdjustAnimation(name, speed, weight)
animTracks[name]:AdjustSpeed(speed)
animTracks[name]:AdjustWeight(weight)
end
local function PlayAnimation(name, speed, weight)
animTracks[name]:Play(transitionTime)
AdjustAnimation(name, speed, weight)
StopAllAnimations(name)
end
local function Running(speed)
if speed > 0.5 then
local relativeSpeed = speed / 16
local runAnimWeight, walkAnimWeight = 0.001, 0.001
if relativeSpeed < 0.5 then
-- Walking speed
walkAnimWeight = 1
elseif relativeSpeed < 0.9 then
-- Blend run and walk
local fadeInRun = (relativeSpeed - 0.5)/(1 - relativeSpeed)
walkAnimWeight = 1 - fadeInRun
runAnimWeight = fadeInRun
relativeSpeed = 1
else
-- Simply run
runAnimWeight = 1
end
if animTracks["Run"].IsPlaying then
if speed > 0.5 then
AdjustAnimation("Walk", relativeSpeed, walkAnimWeight)
AdjustAnimation("Run", relativeSpeed, runAnimWeight)
end
else
PlayAnimation("Walk", relativeSpeed, walkAnimWeight)
PlayAnimation("Run", relativeSpeed, runAnimWeight)
end
else
PlayAnimation("Idle")
end
end
local function Jumping()
jumpAnimTime = 0.31
PlayAnimation("Jump")
end
local function Falling()
if (jumpAnimTime 1 then
local relativeSpeed = speed / 10
if animTracks["Swim"].IsPlaying then
AdjustAnimation("Swim", relativeSpeed, 1)
else
PlayAnimation("Swim", relativeSpeed)
end
elseif not animTracks["SwimIdle"].IsPlaying then
PlayAnimation("SwimIdle", 1)
end
end
local function Sitting()
if humanoid:GetState() == Enum.HumanoidStateType.Seated then
PlayAnimation("Sit", 1)
else
StopAllAnimations("Sit")
end
end
local function PlayFootstepSound(foot, material)
if not foot then return end
local sounds = footsteps.sounds[material]
if not sounds then return end
local random = Random.new()
local soundId = sounds[random:NextInteger(1, #sounds)]
if soundId and soundId ~= lastFootstepSound then
lastFootstepSound = soundId
local sfx = Instance.new("Sound")
sfx.SoundId = soundId
sfx.RollOffMaxDistance = 100
sfx.RollOffMinDistance = 10
sfx.Volume = footsteps.volume[material] or 0.5
sfx.Parent = foot
sfx:Play()
task.spawn(function()
sfx.Ended:Wait()
sfx:Destroy()
end)
else
PlayFootstepSound(foot, material)
end
end
local function OnFootStep(side)
local foot = character:FindFirstChild(side.."Foot")
local floorMaterial = humanoid.FloorMaterial
local material = footsteps.materialMap[floorMaterial]
PlayFootstepSound(foot, material)
if material then
local footprint = footprintFolder:FindFirstChild(material)
if footprint then
footprint = footprint:Clone()
footprint:PivotTo(foot.CFrame * CFrame.new(0, -footprint.PrimaryPart.Size.Y, 0))
footprint.Parent = workspace
Debris:AddItem(footprint, footsteps.decay[material] or 3)
end
end
end
function LoadAnimations()
local animationIDs = {
Climb = "rbxassetid://10921257536",
Fall = "rbxassetid://10921262864",
Idle = "rbxassetid://10921258489",
Jump = "rbxassetid://10921263860",
Run = "rbxassetid://15057664037", -- My custom anim: 11096667011
Walk = "rbxassetid://10921269718",
Swim = "rbxassetid://10921264784",
SwimIdle = "rbxassetid://10921265698",
Tool = "rbxassetid://507768375",
Sit = "rbxassetid://2506281703"
}
local defaultAnimateScript = character:WaitForChild("Animate", 3)
if defaultAnimateScript then
defaultAnimateScript:Destroy()
end
for name, id in pairs(animationIDs) do
local animation = Instance.new("Animation")
animation.AnimationId = id
local track = animator:LoadAnimation(animation)
animTracks[name] = track
animTracks[name].Name = name
if name == "Idle" then
animTracks[name].Priority = Enum.AnimationPriority.Idle
elseif name == "Run" or name == "Walk" or name == "Climb" then
animTracks[name].Priority = Enum.AnimationPriority.Movement
elseif name == "Tool" or name == "Jump" --[[or name == "Fall"]] then
animTracks[name].Priority = Enum.AnimationPriority.Action
end
end
animTracks["Idle"]:Play()
humanoid.Running:Connect(Running)
humanoid.Jumping:Connect(Jumping)
humanoid.FallingDown:Connect(Jumping)
humanoid.FreeFalling:Connect(Falling)
humanoid.Climbing:Connect(Climbing)
humanoid.Swimming:Connect(Swimming)
humanoid.Seated:Connect(Sitting)
-- Custom animation with keyframe marker required for this to work
if animationIDs.Run ~= "rbxassetid://10921261968" then
local oldRunSound = root:WaitForChild("Running")
oldRunSound:Destroy()
animTracks["Run"]:GetMarkerReachedSignal("Footstep"):Connect(OnFootStep)
end
end
LoadAnimations()
RunService.Heartbeat:Connect(function(deltaTime)
if (jumpAnimTime > 0) then
jumpAnimTime = jumpAnimTime - deltaTime
end
local tool = character:FindFirstChildOfClass("Tool")
if tool and tool:FindFirstChild("Handle") then
holdingTool = true
if not animTracks["Tool"].IsPlaying then
animTracks["Tool"]:Play(transitionTime)
end
else
holdingTool = false
animTracks["Tool"]:Stop(transitionTime)
end
end)
Its nice but there is no sitting animations ):
THIS GUY IS STALKING ME I SWEAR TO GOD: FIRST I WANT TO MAKE A DOORS GAME THEN I REALIZE HE MADE A VID FOR IT THE DAY BEFORE, THEN I NEED TO LEARN TWEEN SERVICE FOR MY NEW GAME AND HE MAKES A VID ON THAT, AND NOW THAT I NEED FOOTSTEP SOUNDS THERES THIS TOO! WHAT Edit: JUST REALIZED HE ADDED FOOTPRINTS TOO WHICH I ALSO NEEDED
Gnome Magic
AAAAAA HE'S HERE TOO
so cool! im try to do it and i can create relax nature game! :D
Wow thats actually something unique and would make a good game out of it, good job gnomecode!
I'd use it if it was working on R6 but good job comrade Gnome
THANK YOU SOOOOO MUCH
thanks the tutorial was helpful
Nice video gnomecode!
He's doing the baller
Hey @GnomeCode will you do the Doors Series anymore?
thank you so much it's very better
cool video, still waiting for the new doors video tho
Thank you so much🙏🙏
Cant wait to try it
A year later... still works!!!
So cool thank you
Great video and I love the footsteps. However there is a issuse with them, when I join the actual game through roblox and not studio I can't hear them even when I've saved the game and published to roblox.
Sounds only work in roblox if the owner of the sound you're attempting to use matches the owner of the game.
For example: If the game belongs to you, the sound has to be published by you, and if a group owns the game, the sound must be published by the group.
It wont let me use other animations such as sitting or falling! Is there a way to fix it because I have tried for hours and nothing works
after i did all this, instead of doing your custom footsteps or roblox footsteps, it just went silent. do you know why?
needs to be server side compatible, other players still have default sounds
did you have any luck making it server side?
@@bat2564 nah had to make it from scratch
hello! i love all ur videos, but when new doors tutorial? :)
p.s. video is cool, and helped me! also im 7th!
This is awesome!
Only roblox scripting tutorials force me to lower the volume of every other application by 99% just to hear a crappy mic that might as well be in another room
Thank you, This helped me for the doors tutorial, I didnt like these default roblox sounds :).
This isn't working for me, it plays the default sound and my custom animations don't animated onto the character.
This is very nice and high quality but the delay is a thing. Also, OTHER ANIMATIONS STOP WORKING.
I know its fixable but I personally lack the knowledge and don't seem to get on the right track with numerous hours and attempts put into it.
If anyone here would like to help then please let me know 🙏
This is amazing
Having a bit of an issue where when i change the footstep sound every time i walk on something that trigger the sound my game freezes HARD
I have a suggestion can you make a game like theme park tycoon 2?
thank you
very good tutorial
Hello dude, i have a question, how should i make a morph wich is bigger or smaller then player? Im new in roblox studio and idk how to make it
Very useful thanks
Can you do more on the doors tutorial?
Yeah, we NEED a doors tutorial...
hey im trying to get rid of it but the sound appears in every game i make how do i remove it perm?
for me sometimes it just plays the sound twice with a 0.1 sec delay even tho the walkspeed is 10
wish other players could hear it
Hey, I appreciated you for making a tutorial. One problem that I'm struggled with is that how can I fix the sitting animation, it completely broke for reason. Hope you respond.
add another script that puts the sitting animation in a higher priority than the run animation.
maybe you can make tutorial on how to make game like murder mystery 2 or lumber tycoon 2?
How can I do to make the script work also with the walking animation? I made a custom run animation, and I'm using the default walking r15 animation, but I tried saving it with the animation events the same way you did with the run animation. The sounds get slower when I walk, but they still don't fit, that's why I'm trying to do it manually.
I followed the tutorial but I wanted to use a custom run animation
i want synth and reverb it sounds like heaven
Hey GnomeCode! I wanted to know how to make some type of like realistic camera animation for a game. It would help a lot!
Hey it already the open source one its a realism it on dev forum!