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
 

RayCasting, Problem?

Previous Thread :: Next Thread 
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
17 Sep 2011 08:50 AM
emit = script.Parent

r = Ray.new(emit.Position, emit.CFrame.lookVector * 3)
Hit, Pos = game.Workspace:FindPartOnRay(r)

According to the output im missing an argument on the FindPartOnRay()
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
17 Sep 2011 08:53 AM
Yes, you are.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
17 Sep 2011 08:54 AM
I never needed anymore than one argument. Then again ROBLOX said they are still making changes to it. What argument am I missing?
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
17 Sep 2011 08:55 AM
http://wiki.roblox.com/index.php/FindPartOnRay_(Method)
"Your argument is invalid."
I just had to say that.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
17 Sep 2011 08:59 AM
So I just put a vector3 value?

r = Ray.new(emit.Position, emit.CFrame.lookVector * 3)
Hit, Pos = game.Workspace:FindPartOnRay(r, Vector3.new(0,0,0))
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
17 Sep 2011 09:00 AM
FindPartOnRay(> Ray <,> Instance <)

You can just put in a part or something.
Instance.
Like in Instance.new().
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
17 Sep 2011 09:06 AM
Could I put in nil so that I dont need to put an instance in. And if I do put an instance what will it do?
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
17 Sep 2011 09:06 AM
Try it out, if it doesn't work, just put in true.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
17 Sep 2011 09:09 AM
Yep, Putting in nil works fine.
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
17 Sep 2011 09:10 AM
Well then, there you go.
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