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
 

Reset torso velocity?

Previous Thread :: Next Thread 
kamac is not online. kamac
Joined: 05 Dec 2008
Total Posts: 153
02 May 2014 07:24 AM
Hi.

Is there a way to reset torso velocity? Like, if the character is in air, during falling, can I somehow reset his velocity so that he starts from 0,0,0 again (So that he would slow down to, like, 0 vertical speed and the gravity would be forced to reaccelerate him from start, while in air)

I tried player.Character.Torso.Velocity = Vector3.new(0,0,0) but that doesn't do anything.
Report Abuse
kamac is not online. kamac
Joined: 05 Dec 2008
Total Posts: 153
02 May 2014 08:30 AM
Sadness bump
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
02 May 2014 09:09 AM
BodyForce.

~masterCameron101, advanced Lua programmer, certified graphics designer and geek~
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
02 May 2014 09:16 AM
you need to make same force that is pushing player up
Report Abuse
kamac is not online. kamac
Joined: 05 Dec 2008
Total Posts: 153
02 May 2014 09:21 AM
If I add bodyforce, how long should I make it stay? Ideally I'd want to keep it for one game tick, so that torso's velocity had been zeroed. How do I go about that, though?
Report Abuse
kamac is not online. kamac
Joined: 05 Dec 2008
Total Posts: 153
02 May 2014 10:43 AM
B~u~m~p
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
02 May 2014 11:18 AM
I tried player.Character.Torso.Velocity = Vector3.new(0,0,0)

That should work for his Y Velocity, the middle number (up & down), do for what u want that should be fine.

But .Velocity's X & Z, for a Humanoid, cannot be set. You can use BodyVelocity for that. This function is used in Auto-Tackle to deliver a "Block" to another player....


function windforce(dir, victimTorso)
for i=1,3 do
if victimTorso.Parent:FindFirstChild("ForceField") then return end
if not victimTorso:FindFirstChild("WindEffect") then
local force = Instance.new("BodyVelocity")
force.Name = "WindEffect"
force.maxForce = Vector3.new(1e7, 1e7, 1e7)
force.P = 125
force.velocity = (dir * 30)
force.Parent = victimTorso
game.Debris:AddItem(force, .25)
end
end
end
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
02 May 2014 11:29 AM
um... this does work but....

for i=1,3 do -- Don't know why he throws 3 BVd into Torso. I don't think u have to do that...
if victimTorso.Parent:FindFirstChild("ForceField") then return end
if not victimTorso:FindFirstChild("WindEffect") then
local force = Instance.new("BodyVelocity")
force.Name = "WindEffect"
force.maxForce = Vector3.new(1e7, 1e7, 1e7)
force.P = 125 -- ... instead just monkey with these numbers...
force.velocity = (dir * 30)
force.Parent = victimTorso
game.Debris:AddItem(force, .25) -- He tells the Force to kill itself afte a 1/4 of a second...
end
end
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