0
\$\begingroup\$

In my game I want to make a skill in a tool to dash forward for a specific range and if the character came in contact with a humanoid during the dash, it stops right on contact and stops the other humanoid from moving temporarly too and deal damage

I don't know what functions should i do and where to look for them... i figured how to use onActivate and getting the mouse through Equipped Appritiate any help and guidance

\$\endgroup\$
  • \$\begingroup\$ Welcome to GDSE. This is essentially a 'where do I start' question & as such, is not on-topic. If you're having trouble getting started, search for some introductory tutorials/videos. Also, check out the Roblox developer's hub. They might not show you directly how to make a character dash, but they will give you enough foundation to get to the point where you can ask focused, on-topic questions here, should you run into trouble. \$\endgroup\$ – Pikalek Sep 18 '19 at 14:38
0
\$\begingroup\$

It sounds like you're looking for BodyForce.

A good place to start on how it works might be the code in this video showing a simple script for a jump pad. The jump pad object responds when touched by parenting a BodyForce instance to the object that touched it for a short time.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

To answer your question would require a tutorial length post. So many things come into play including Filtering Enabled settings. However, I can answer "How to make the character dash forward in Roblox" for you.

First thing you will need to do is capture the player object. There are a few ways to do this, but the easiest way to capture the player object is when they first spawn into your server world. If you create a regular 'Script' and put it somewhere in your 'Workspace', all you have to do is add:

game.Players.PlayerAdded:Connect(function(PlayerObject)

workspace.Data.Player.Value = PlayerObject

end)

Now when a player spawns into your world, the first line of code captures the player object and stores it in the variable named PlayerObject. The second line of code that I used, takes the player object and stores it into an 'ObjectValue' container that I added and named 'Player', and then stored in a folder which I called 'Data'. Now I can get the player object from any server sided script by using:

variablename = workspace.Data.Player.Value

This can be modified anyway you please, as long as you capture and store the player object somehow. Once you have the player object, you can adjust the player's speed by using:

variablename.Character.Humanoid.Walkspeed = 50 -- or whatever number you want

Hope this helps. Good Luck.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.