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
 

Why isn't my fly tool working?

Previous Thread :: Next Thread 
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
18 May 2010 04:58 PM
it just kills me when I use it.

speed = 100

me = game.Players.HadesDude

if script.Parent.className ~= "HopperBin" then
h = Instance.new("HopperBin")
h.Parent = me.Backpack
h.Name = "Fly Tool"
script.Parent = h
end

function B1D(mouse)
local BV = Instance.new("BodyVelocity")
BV.Parent = me.Character.Torso
BV.maxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.velocity = Vector3.new(me.Character.Torso.CFrame.lookVector - mouse.Hit.p).unit*-speed
end

function S(mouse)
mouse.Button1Down:connect(function () B1D(mouse) end)
end

script.Parent.Selected:connect(S)
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
18 May 2010 05:09 PM
you will fly forever. Also,

me = game.Players:FindFirstChild("HadesDude")
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
18 May 2010 05:17 PM
I know, I just want to fly, then I'll add in the stoping thing.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
18 May 2010 05:40 PM
ugh, bump
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
18 May 2010 06:04 PM
... bump
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
18 May 2010 07:44 PM
Help please...
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
19 May 2010 11:55 AM
bump
Report Abuse
rockjumper111 is not online. rockjumper111
Joined: 05 Oct 2008
Total Posts: 3780
19 May 2010 12:38 PM
get the one in my iron man 2 suitcase.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
19 May 2010 12:43 PM
No, I want to make my own.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
19 May 2010 05:21 PM
bump...
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
19 May 2010 06:10 PM
try getting rid of the math.huge... infinity is a big number.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
19 May 2010 06:36 PM
Didn't work.
Report Abuse
HadesDude is not online. HadesDude
Joined: 16 Feb 2009
Total Posts: 11982
19 May 2010 07:39 PM
Help.
Report Abuse
Dqbert is not online. Dqbert
Top 100 Poster
Joined: 14 Aug 2008
Total Posts: 18589
19 May 2010 07:47 PM
try a bodyforce?

bodyforce.force=mouse.hit.lookVector*Vector3.new(speed, speed, speed)?
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
19 May 2010 07:48 PM
I don't see any reason that this script should kill you, but this line is also incorrect:

BV.velocity = Vector3.new(me.Character.Torso.CFrame.lookVector - mouse.Hit.p).unit*-speed

should be

BV.velocity = Vector3.new(me.Character.Torso.Position - mouse.Hit.p).unit* -speed

or

BV.velocity = Vector3.new(mouse.Hit.p - me.Character.Torso.Position).unit *speed

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