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: Raycasting

Previous Thread :: Next Thread 
SlashTag is not online. SlashTag
Joined: 27 May 2013
Total Posts: 73
15 Jun 2013 12:44 PM
So I understand Origin and dirtection and everything, but I can't figure out how to use it in the way I desire.

I set the origin, but I want the direction to alternate between position A1,A2,A3,A4 for (x) amount of time.

local ray = Ray.new(user.Arm2.Output.CFrame.p, (mouse.Hit.p - user.Arm2.Output.CFrame.p).unit*300)

The origin is Output, but for now the direction is Hit. How can I make the direction alternate?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
15 Jun 2013 12:51 PM
Just change this:

mouse.Hit.p

To like:

local Hit = mouse.Hit.p
A1 = Hit + Vector3.new(3, 5, 0)

And so on.
Report Abuse
SlashTag is not online. SlashTag
Joined: 27 May 2013
Total Posts: 73
15 Jun 2013 12:53 PM
Alright, thanks for the help :D
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