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 please help

Previous Thread :: Next Thread 
jmasterj10 is not online. jmasterj10
Joined: 19 Sep 2010
Total Posts: 735
26 Mar 2014 08:53 PM
function moveRight(part)
local ray = Ray.new(
Vector3.new(part.CFrame.p),
Vector3.new(part.CFrame.p + Vector3.new(0,0,1))
)
local ignore = script.Parent
hit = Workspace:FindPartOnRay(ray)
if hit.Name == part.Name then --THIS LINE IS BROKEN
match(part, hit)
end
if ray == nil then
for i = 1, 20 do
part.CFrame = part,CFrame + Vector3.new(0, 0, 0.2)
end
end
end

Error: Trying to index global hit(nil value)
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
26 Mar 2014 08:54 PM
part,CFrame + Vector3.new(0, 0, 0.2)

part.CFrame*
Report Abuse
A8U is not online. A8U
Joined: 25 Mar 2014
Total Posts: 63
26 Mar 2014 08:55 PM
Hit is nil...
if hit and hit.Name == part.Name then
Report Abuse
jmasterj10 is not online. jmasterj10
Joined: 19 Sep 2010
Total Posts: 735
26 Mar 2014 08:56 PM
omg tank u; u a wizrd
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