generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do you make a pushback effect?

Previous Thread :: Next Thread 
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
01 Jun 2014 09:13 PM
How do you make a pushback effect? Like when a player uses a kick move, how do you make it push the player back, and can you choose what distance?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 09:16 PM
For the distance, you can use -torso.CFrame.lookVector and you can push the player back by setting the velocity to that times some number
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Jun 2014 09:16 PM
Here's a snippet of what I was working on:

Target.Velocity = Direction.CFrame.lookVector * 50

--Target being what you want pushed back, Direction being the direction it is pushed

Not really distance per se, but you can play with the numbers to produce desired results.
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
01 Jun 2014 09:17 PM
If youre making a move, Id use magnitude instead of .Touched to get a players torso.


torso.Velocity = torso.CFrame.lookVector*-30


Idk
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 09:19 PM
Knight, I meant the guy who got kicked's lookVector but I just realized that makes no sense and your way is much better.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Jun 2014 09:23 PM
I actually got it, lol. Might have been a little over the OP's head since it's pretty new to him though.
Report Abuse
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
01 Jun 2014 10:54 PM
So to connect it so the leg makes the pushback, would you use "hit.Character"?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Jun 2014 10:56 PM
assuming things are defined, something like:

hit.Parent.Torso.Velocity = Leg.CFrame.lookVector * 50
Report Abuse
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
01 Jun 2014 10:59 PM
Hmm... Sounds legit, thanks!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:04 PM
Isn't the leg's (and arm's) lookVectors the -y direction while the torso and head is the -z direction? I'm not sure about the leg's and arm's but to be safe you can use the Torso's lV
Report Abuse
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
01 Jun 2014 11:10 PM
So you're saying instead of leg, torso?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:12 PM
Probably, I've never actually checked but I'm assuming the legs and arms are rotated 180 degrees on the z-axis
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:13 PM
rotated 90 degrees*
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:16 PM
God I'm messing up a lot, 90 degrees on the x-axis
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:17 PM
90 degrees clock-wise
Report Abuse
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
01 Jun 2014 11:22 PM
I don't get what you're talking about here.. Lol, all I'm asking for is if the players leg, that was going to kick the opponent's body how would I make it connect, to the pushback effect?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:23 PM
Just use what he gave you, but if they get pushed differently than use the Torso
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Jun 2014 11:27 PM
torso.Velocity = torso.CFrame.lookVector*-50
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Jun 2014 11:29 PM
It's not a good idea to do it that way island because you are assuming they are being kicked directly infront of the person.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Jun 2014 11:40 PM
ohh, I thought you meant when the player is kicking, not when the player gets kicked..

leg.Touched:connect(function(h)
h.Velocity = leg.CFrame.lookVector*100
end)

something like that? might need to be rotated, or something
Report Abuse
Lem0nzz is not online. Lem0nzz
Joined: 18 Jul 2011
Total Posts: 926
02 Jun 2014 12:45 AM
Ok thanks, and just to make sure, it's "Right Leg", or "Left Leg", not leg right? leg could just be a variable?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image