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: Reducing Jump Height

Previous Thread :: Next Thread 
salem9 is not online. salem9
Joined: 25 Oct 2008
Total Posts: 23312
04 Aug 2012 10:49 PM
I'm making a tool, and I need to be able to reduce jump height for it to work well. However, I don't want to increase the amount of down-force on the player, because then they will fall faster than they normally would. Instead, I would like to reduce the amount of force behind the jump. Is that possible?
Report Abuse
salem9 is not online. salem9
Joined: 25 Oct 2008
Total Posts: 23312
04 Aug 2012 11:25 PM
Bump.
Report Abuse
T3XT is not online. T3XT
Joined: 25 Jul 2011
Total Posts: 9233
04 Aug 2012 11:44 PM
Hmmm....

hang in there, I'm coming up with something for you
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
04 Aug 2012 11:45 PM
It's not possible at this time to modify jump power. That would be a nice feature, though.

I'll have to ask John in the Uber-Chatroom.
Report Abuse
T3XT is not online. T3XT
Joined: 25 Jul 2011
Total Posts: 9233
04 Aug 2012 11:47 PM
Oh man

alright, I'll kind of have to bend things here since the property itself can't be edited

hang in a little longer OP


Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
04 Aug 2012 11:48 PM
Can't you do something about gravity?
Report Abuse
baxterknite is not online. baxterknite
Joined: 21 Nov 2008
Total Posts: 383
04 Aug 2012 11:49 PM
You can use bodyvelocity or something like that to do this. It's just like when people use it to simulate low gravity except you're going in the other direction to increase the gravity.
Report Abuse
salem9 is not online. salem9
Joined: 25 Oct 2008
Total Posts: 23312
04 Aug 2012 11:50 PM
@xnite

I could "alter" gravity by putting a BodyForce into each player's torso and putting downforce onto them, but I just want to decrease the jump height, not decrease it AND make them fall faster. Thanks to you guys for trying to help, looks like I'll have to somehow look for the spacebar and when it is pressed.
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
04 Aug 2012 11:51 PM
@baxter;
That's the problem.
OP doesn't want a change in gravity, he wants a change in how high the player can jump. They're not exactly the same.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
04 Aug 2012 11:52 PM
Salem, Workspace.Player.Humanoid.Jump:connect(function() print("SOme one has jumped :D") end)
Report Abuse
salem9 is not online. salem9
Joined: 25 Oct 2008
Total Posts: 23312
04 Aug 2012 11:53 PM
@ninja

Thanks, was thinking of a KeyDown function, but that will work jut as well.
Report Abuse
T3XT is not online. T3XT
Joined: 25 Jul 2011
Total Posts: 9233
04 Aug 2012 11:58 PM
oh someone else answered


sorry, i almost got you something else too

Report Abuse
salem9 is not online. salem9
Joined: 25 Oct 2008
Total Posts: 23312
05 Aug 2012 12:00 AM
@T3XT

Please, add it anyway. This didn't solve the problem, more than likely I won't be able to get the 'workaround' to work.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
05 Aug 2012 12:09 AM
Here is an idea, add a body force while jumping, the remove it when they aren't. Or if they start free-falling remove it.
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
05 Aug 2012 01:08 AM
You can just set the velocity of their parts to 0 when they jump

char.Humanoid.Jump:connect(function()
for _, part in pairs(char:GetChildren()) do
if part:IsA("BasePart") then -- just parts you want!
part.Velocity = Vector3.new()
end
end
end)
Report Abuse
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
05 Aug 2012 01:50 AM
game.Players["LuisPambid"].Character.Humanoid.Jump:connect(function()
Torso=game.Players["LuisPambid"].Character["Torso"]
Torso.Velocity=Vector3.new(0,Torso:GetMass()*196.2*.5,0)
end)
Report Abuse
SWEAWFOCrocks is not online. SWEAWFOCrocks
Joined: 11 Mar 2009
Total Posts: 573
05 Aug 2012 04:15 AM
Couldnt you edit the roblox animate local script in a player so when they join its replaced? Just a guess but it handles with your players animations so set it so it gets the Y value for your character then when you jump say 3 studs higher it turns your characters velocity to 0 on Y which stops the constant movement of your character allowing you to fall normal after:o
Report Abuse
chris1989 is not online. chris1989
Joined: 30 Nov 2007
Total Posts: 2520
05 Aug 2012 05:35 AM
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local Hum = char:findFirstChild("Humanoid")
repeat wait() until Hum ~= nil
Hum.Jumped:connect(function()
local Torso = Hum.Parent:findFirstChild("Torso")
repeat wait() until Torso ~= nil
local hight = Torso.Position.Y
local max = Torso.Position.Y + 3
repeat wait() until Torso.Position.Y >= max
for i,v in pairs(Hum.Parent:children()) do
if v:IsA("Part") then
v.Velocity = vector3.new(0,0,0)
end
end
end)
end)
end)
Report Abuse
chris1989 is not online. chris1989
Joined: 30 Nov 2007
Total Posts: 2520
05 Aug 2012 05:42 AM
Fixed a couple errors

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local Hum = char:findFirstChild("Humanoid")
repeat wait() until Hum ~= nil
Hum.Changed:connect(function(p)
if p == "Jump" then
local Torso = Hum.Parent:findFirstChild("Torso")
repeat wait() until Torso ~= nil
local max = Torso.Position.Y + 3-- Change 3 to adjust max height
repeat wait() until Torso.Position.Y >= max
for i,v in pairs(Hum.Parent:children()) do
if v:IsA("Part") then
v.Velocity = Vector3.new(0,0,0)
end
end
end
end)
end)
end)
Report Abuse
SWEAWFOCrocks is not online. SWEAWFOCrocks
Joined: 11 Mar 2009
Total Posts: 573
05 Aug 2012 02:32 PM
Mhmmz thought it should work:3 posted it at 3am so i was kinda tired credit to chris1989 for scripting it:p
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
05 Aug 2012 02:40 PM
You could measure the jump height, then whenever they jump, put a brick there, and so for like 1-2 seconds there's a brick above them and they don't jump as high <3
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