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: How to change raycast size?

Previous Thread :: Next Thread 
Tedgary009 is not online. Tedgary009
Joined: 29 Dec 2009
Total Posts: 339
28 Oct 2015 01:12 PM
Instead of pointing in a direction like a small laser?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
28 Oct 2015 01:15 PM
ray.Size = Vector3.new(0.3, 0.3, distance)

Rather than use "distance" as the third argument replace with your size.
Report Abuse
Tedgary009 is not online. Tedgary009
Joined: 29 Dec 2009
Total Posts: 339
28 Oct 2015 01:33 PM
'Size cannot be assigned to'

I'm doing something wrong
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
28 Oct 2015 01:35 PM
When you create your raycast part; what is it called?

Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
28 Oct 2015 01:41 PM
he isn't talking about the part
Report Abuse
Tedgary009 is not online. Tedgary009
Joined: 29 Dec 2009
Total Posts: 339
28 Oct 2015 01:43 PM
I don't think I've done that yet, this is all I got

local ray = Ray.new(Head.Position, (Head.CFrame.lookVector).unit*-Solid.Scale.Y*2)
ray.Size = Vector3.new(0.3, 0.3, 0.3)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
28 Oct 2015 01:43 PM
You can't the diameter of rays. It's a ray.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
28 Oct 2015 01:44 PM
Rays don't have a 'Size'. You can apply a magnitude to it to get a line segment though.

local r = Ray.new(Vector3.new(0,0,0),Vector3.new(0,1,0)*10)

That is a ray that's 10 studs in length. (kinda illogical since it is a ray, but bare with it). Yes that vector math is extremely easy, but it's for demonstration.
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