In this video, I teach you guys how to script a shift to sprint script. At the end, I teach you how to make it a double tap to sprint script.
Пікірлер: 39
@uliveulearnandregret Жыл бұрын
bro thanks so much, I didn't need the W tap or shift, in a sense I need stamina and max stamina and if it is 0 they are forced to stop sprinting, but on a related not you helped me with tick, so now I can make a combo hit animation based on tick to check if they pressed the attack button before the first animation played then it will play the second animation, think more like fighting games, or games like Let It Die
@DominatorX14 Жыл бұрын
After watching 20 videos and trying all the scripts yours was the only one that worked
@scripting Жыл бұрын
I’m glad!
@moonshard6900 Жыл бұрын
thx for tutorial man
@TheHidden-pw1vj11 ай бұрын
For this the useful thing I've Seen
@scripting11 ай бұрын
Glad it was helpful!
@Donpa073 ай бұрын
please make how to zoom in zoom out smoothly or make a script about it. i still dont understand tweenservice or how to script at all
@camronandelean36668 ай бұрын
Is there a way to incorporate this into using ContextActionService?
@askshells8 ай бұрын
How does this work tho? because the code says if input.Keycode == Enum.Keycode.W then so surely if they press w then the code would run right? and you wrote "timesincelastwpressed" how do you even know when the last w was pressed, why would it track that?
@scripting8 ай бұрын
As explained in the video, we use tick to figure out when the last time someone pressed W was. We aren’t interested in the time that they pressed W as much as we’re interested in the difference in time (delta time). Let me make this more clear: Suppose you pressed W 2 times. You pressed it the first time, and then you waited 5 seconds, and pressed it the second time. They press it the first time. Let’s say tick() is equal to 100. They waited 5 seconds. They pressed it again. tick() is now equal to 105. So, if you subtract the 2 ticks together, 105-100=5. This tells us that the player pressed W two times with 5 seconds in between. That’s too long for it to begin sprinting. Does this make sense?
@scripting8 ай бұрын
Since 5 seconds is too long, we don’t begin sprinting. But if the difference in tick was smaller, then we know that they pressed it “fast enough” For example, if we subtracted the two ticks and it came out to .5 then they pressed W 2 times with .5 secs of gap
@insomosni Жыл бұрын
Yo man, I modified the script and it didn't work. Can I get get your discord to see if I can get help?
@aaron-pb2lb Жыл бұрын
mine dosent work i double checked if i had wrote the script properly and i did could u help me
@RayenTra Жыл бұрын
Hi wanted to ask what i should do if i wanted to add an animation to that running script :) thank you!
@scripting Жыл бұрын
Hi! Look up “humanoid:LoadAnimation” It would be sort of like local animation = Instance.new(“Animation”) animation.AnimationId = 1 - put your id here humanoid:LoadAnimation(animation):Play() - something like this
@RayenTra Жыл бұрын
@@scripting Ty men great guy
@RayenTra Жыл бұрын
@@scripting hi again lol (I’m new to scripting and stuff so sorry if I’m acting stupid) It tells me „Unknown global ‚humanoid‘“
@scripting Жыл бұрын
That’s because your humanoid is undefined. You’ll want to read up and learn a bit on those concepts (I’m actually working on a giant series on them), but for now- here’s a fix. Put this on the top of your code somewhere local humanoid = game.Players.LocalPlayer.Character.Humanoid This will allow you to access your humanoid. Make sure that it’s on a local script tho or it won’t work
@RayenTra Жыл бұрын
@@scriptingsorry again. Now it tells me Player.[Username].PlayerScripts.LocalScript:2: attempt to index nil with ‚Humanoid‘
@influXse01 Жыл бұрын
So many code i can write but hard...
@Sonicthespeedster7110 ай бұрын
maybe pls try putting all the code in the description in the description in your future videos
@scripting10 ай бұрын
Hi! The source code is always available to patrons www.patreon.com/PremiumScripters
@Sonicthespeedster7110 ай бұрын
@@scripting how do i add an amination to it?
@eridonhasani23928 ай бұрын
how can you add a animation to it?
@goldenollies83386 ай бұрын
Animation track (Id) play I think you add a little im new to scripting search a totoriul
@ownedfr08 ай бұрын
how to do animation while sprinting tho
@scripting8 ай бұрын
Use this How to Script CUSTOM ANIMATIONS in Roblox Studio (BEGINNER FRIENDLY) kzfaq.info/get/bejne/fMCIZMWkqc6qfH0.html
@ownedfr08 ай бұрын
@@scripting thank you man I’ll definitely try it out 🙏
@thegamercow7736 ай бұрын
PLEASE MAKE A TUTORIAL FOR HOW TO MAKE IT MORE SMOOTH