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 » Scripters
Home Search
 

Re: Raycasting straight in front of your tool?

Previous Thread :: Next Thread 
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
15 May 2016 04:03 PM
I'm trying to make it so that when you click, a raycast will start from your tool and end directly in front of it.

this is what I have:

local ray = Ray.new(tool.Handle.CFrame.p, ((tool.Handle.CFame.P + 2) - tool.Handle.CFrame.p).unit * distance)

however, it gives me the error on this line:

14:56:04.033 - CFame is not a valid member of Part

Any suggestions?
Report Abuse
cowsoncows is not online. cowsoncows
Joined: 11 Oct 2013
Total Posts: 2522
15 May 2016 04:05 PM
You wrote CFame, it's CFrame, you left out the 'r'
Report Abuse
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
15 May 2016 04:14 PM
oh that's stupid of me.
Report Abuse
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
15 May 2016 04:35 PM
Alright, but the problem still persists, how do I make the raycast fire relative to the direction the tool is facing?
Report Abuse
KAMIKAZEPOLO is not online. KAMIKAZEPOLO
Joined: 14 Mar 2012
Total Posts: 1049
15 May 2016 10:32 PM
Any help?
Report Abuse
Entelicon is not online. Entelicon
Joined: 06 Nov 2012
Total Posts: 1002
15 May 2016 10:33 PM
lookVector
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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