Sildow
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1124 |
|
|
| 28 Apr 2014 07:05 AM |
I'm to be creating a 'nograv training field' in a 'facility orbiting earth'. The 'nograv' effect would be of what happens when you :nograv (player) using any popular admin command system.
That being said, would there be a short, compact, script to implement that if on spawn, all players were automatically nograv'd? |
|
|
| Report Abuse |
|
|
Tesouro
|
  |
| Joined: 19 Dec 2010 |
| Total Posts: 1284 |
|
|
| 28 Apr 2014 07:53 AM |
You are requesting a script. This is not the right place to do it.
But,
I can tell you that gravity is a force that makes the parts go down. If you want a nogravity, you got to create a force strong enough to equal gravity. |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 08:06 AM |
How to make no gravity!
clone gravity turn it upside down boom, no gravity. :)
~masterCameron101, advanced Lua programmer, certified graphics designer and geek~ |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 28 Apr 2014 08:15 AM |
http://wiki.roblox.com/index.php?title=Gravity
http://wiki.roblox.com/index.php?title=GetMass_(Method) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 28 Apr 2014 09:26 AM |
| No gravity would be no fun, you'd just be floating in the air, to make a moon effect then put a bit of it and then you'll be able to like control where you go. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Apr 2014 11:06 AM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) for _,v in pairs(c) do if v:IsA("BasePart") then local bf = Instance.new("BodyForce", v) bf.force = Vector3.new(0,196.2,0) * v:GetMass() elseif v:IsA("Hat") then local bf = Instance.new("BodyForce", v.Handle) bf.force = Vector3.new(0,196.2,0) * v:GetMass() end end) end) |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2014 11:09 AM |
| you should add no gravity and flying |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 28 Apr 2014 12:19 PM |
for i, v in pairs (c) do
should be
for i, v in pairs (c:GetChildren()) do |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|
Sildow
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1124 |
|
|
| 29 Apr 2014 12:01 AM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) for _,v in pairs (c:GetChildren()) do if v:IsA("BasePart") then local bf = Instance.new("BodyForce", v) bf.force = Vector3.new(0,196.2,0) * v:GetMass() elseif v:IsA("Hat") then local bf = Instance.new("BodyForce", v.Handle) bf.force = Vector3.new(0,196.2,0) * v:GetMass() end end) end)
Put in a script, set in workspace was wondering, if it should be in a localscript? or if it can stay in a normal 'basic object' script, can it stay in workspace?
Sorry, I'm a scripting nub. :P |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2014 12:04 AM |
Workspace, regular script.. .-. cmon, its not rocket science.. |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 29 Apr 2014 11:58 AM |
PlayerAdded doesn't work in Local Scripts. >So script.
Scripts are normally under Workspace or ServerScriptService ServerScriptService can't be hacked, Workspace can. >ServerScriptService |
|
|
| Report Abuse |
|
|