I’d like to make a dash similar to the one in this gif.
However; I don’t want the player’s altitude to lower over time. It uses a stamina system that I’d also like t o add. I don’t have any scripting experience, so I would appreciate it if someone were to help me out.
just change the local character’s humanoid walkspeed and change locally also the gravity with a loaded costume animation
You could use a body gyro or body force. Sadly I didnt use both of these in one of my project so I cannot help much
You can add velocity in the camera’s direction by using code similar to this:
Rootpart.Velocity += Camera.CFrame.lookVector * 100
The number on the end is how powerful the boost is. This dash is only a one-time boost however, but if you looped it it would likely have a similar effect to the gif.
The example you gave has a lot of different things going on. Trails, moving the player, playing an animation, and changing the cameras FOV.
Here is an RBLX file that you can open in Roblox Studio that contains my attempt at recreating the dash:
Dash.rbxl (37.4 KB) ( Rushed, but it works. Also, the UI does nothing.)
Video of it:
If you want to understand everything, here is a bunch of stuff that could help:
-
You can use UserInputService to know when a player presses a button. Here is a video that explains it: Advanced Roblox Scripting Tutorial #6 - UserInputService (Beginner to Pro 2019) - YouTube
-
Getting a players button press is done on the client, or local script. However you need to move the player on the server, a normal script, so that the moving works and other players can see it. You can communicate from the client to server using a Remote Event or a Remote Function. Here is a video explaining that: Advanced Roblox Scripting Tutorial #8 - Remote Events & Remote Functions (Beginner to Pro 2019) - YouTube
-
The FOV changing of the Camera has to be done on the client, a local script. You get the Current Camera to mess with things like the FOV or CFrame ( Position of camera ). Here is a video explaining Camera Manipulation: Advanced Roblox Scripting Tutorial #28 - Camera Manipulation (Beginner to Pro 2020) - YouTube
-
I personally have not used Trails yet so I don’t know much about them.
-
You can use many things to move the player, but I used Tween Service to move the players Position. Here is a video explaining Tween Service: Roblox TweenService Tutorial 2021 | Roblox Studio - YouTube
Hope this helped and feel free to change anything about the dash thing I made.
Thanks so much!! I’ll be sure to check out the sources you gave for more info