wow75Join Date: 2009-01-16 Post Count: 951 |
I want make a script so when you respawn you have natural high jumping, i personally have no idea how to do this, the gravity coil script looked to centered as a gear. This is all i have:
function Respawn(hit)
local equalizingForce = 236 / 1.2
local gravity = .50
hit.parent.Gravity = gravity
end
Thats literally all i can think of... |
|
wow75Join Date: 2009-01-16 Post Count: 951 |
I know it's bad, but can i at least get a pointer? |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
[ Content Deleted ] |
|
3lex33Join Date: 2008-10-08 Post Count: 5220 |
Use bodyvelocity. |
|
wow75Join Date: 2009-01-16 Post Count: 951 |
Is there a way to make it slow like the gravity coil? |
|
RA2loverJoin Date: 2008-11-09 Post Count: 1254 |
Bodyforce with upwards vector being (PlayerMass)*9.81*15.
i'll leave that and hat/gear mass detection for you to solve though. |
|
wow75Join Date: 2009-01-16 Post Count: 951 |
I'll just add a get-rid-of-hats thing at the spawn. So where do i find Player mass? Or is it like Position, where it always varys? |
|
3lex33Join Date: 2008-10-08 Post Count: 5220 |
mass = x * y * z * 1. Sum up all player parts masses. |
|
wow75Join Date: 2009-01-16 Post Count: 951 |
I looked through the player parts, icouldn't find mass... |
|
robocorpJoin Date: 2010-04-25 Post Count: 804 |
Here's the value of gravity:
196.125 per cubic stud
I figured that out. Also, use BodyForce in the torso.I don't recommend using that total value for the push on the Y axis due to the fact that you will fly up indefinitely
Use like grav*mass/0.50. That will half the gravity.
"Every day I'm trollin you." ~mikeyman10ash |
|
robocorpJoin Date: 2010-04-25 Post Count: 804 |
you do X*Y*Z will return the mass of the part
"Every day I'm trollin you." ~mikeyman10ash |
|
|
@Wowgnomes
LocalScripts have nothing to do with this...
@wow57
You should use BodyForce for that.
i.e.
local Part = Workspace.Part
local GravityOffset = 0.5
local PartMass = Part:GetMass()
local BodyForce = Instance.new("BodyForce", Part)
BodyForce.force = Vector3.new(0, PartMass * GravityOffset, 0)
-- This will basically make it have half the normal gravity it would normally have.
×TNS× |
|
|
Oops. Meant wow75, not wow57... Stupid dyslexia... :<
×TNS× |
|
wow75Join Date: 2009-01-16 Post Count: 951 |
Thanks guys, but now my mom wants me off the CPU, so cya later. |
|
|
Oops... I messed up my formula.
local Part = Workspace.Part
local GravityOffset = 0.5 -- 1 = Full, no gravity / 0 = Normal gravity
local PartMass = Part:GetMass()
local BodyForce = Instance.new("BodyForce", Part)
BodyForce.force = Vector3.new(0, PartMass * (196.1 * GravityOffset), 0)
-- This will basically make it have half the normal gravity it would normally have.
Btw, CPU is something within the computer, not the actual computer it self...
×Dyslexic Scripter at Work× |
|
Bubby4jJoin Date: 2008-12-25 Post Count: 1831 |
You sit on the CPU? The CPU would overheat and burn you! |
|
nate890Join Date: 2008-11-22 Post Count: 21686 |
gravity in roblox is 196.2
|
|
|
|
nate890Join Date: 2008-11-22 Post Count: 21686 |
Quenty, you can always make air using bodyforce.
|
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
@TheNewScripter
BodyForce isnt a good idea if he wants to reduce gravity.
BodyForce moves the Object on its Local Axis
BodyVelocity moves it on the game's axis. |
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
@Quenty
game.Lighting.WindDirection = Vector3.new(0,1,0.3)
game.Lighting.WindForce = Vector3.new(9001,9001,9001)
If only....
But for now what I really want is LocalLighting >:O |
|
|
@xvg
It actually goes based of game axis... I know because I use it in one of my tools...
×TNS× |
|
|
Actually... I take that back. You are right, I forgot I have some sort of formula to fix it... I think... I don't know. I do know that I use that formula for the projectile, and it works...
×TNS× |
|
robocorpJoin Date: 2010-04-25 Post Count: 804 |
@nate I spent all day calculating gravity once (I had nothing to do) and My calculations are correct, check my above post.
"Every day I'm trollin you." ~mikeyman10ash |
|