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: Hmmm . . . Heh. . .Velocity >.>

Previous Thread :: Next Thread 
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 10:36 PM
script.Parent.Equipped:connect(function(mouse)
script.Parent.Activated:connect(function()
local pos, hit = script.Parent.Handle.Position, mouse.Hit.p
local magnitude = (pos - hit).magnitude
script.Parent.Parent = game.Workspace
script.Parent.Handle.Velocity = -(pos - hit).unit*magnitude/2 + Vector3.new(0, magnitude, 0)
end)
end)

So, this is a tool. what I want is when I click it the basketball goes forward where the mouse is hit. Like, a regular basketball. But I keep on getting this output.

This Mouse is no longer active
22:35:51 - Script "Workspace.Basketball.Throw", Line 3
22:35:51 - stack end

Help?

Not good with tools, yeah know :/
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 11:02 PM
Bump
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
28 Apr 2012 11:04 PM
Question : Why'd you use .Activated with .Equipped? .Activated runs when the tool is equipped at the user clicks. So .Equipped is pretty much completely worthless.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 11:08 PM
It's arguement is mouse. I use mouse for mouse.Hit.p.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
28 Apr 2012 11:13 PM
Why not use .Button1Down?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 11:19 PM
Because when I first tried that nothing happened.

Do you know what's wrong?
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
28 Apr 2012 11:39 PM
Your 6th line confuzzles me.
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
28 Apr 2012 11:54 PM
[ Content Deleted ]
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
28 Apr 2012 11:55 PM
No. . .

Anyone else?? :O
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
29 Apr 2012 12:32 AM
Bawmp
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 02:16 AM
unit*magnitude = original vector

Inefficient...
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