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 » Game Design
Home Search
 

Re: Auto-jump

Previous Thread :: Next Thread 
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
09 May 2015 10:16 AM
I'm trying to make an NPC auto-jump when a block is close to them, I currently have this, but it seems to be inconsistent:

while true do
wait(.5)
ray = Ray.new(script.Parent.Torso.CFrame.p,((script.Parent.Torso.CFrame.p + Vector3.new(0,-1.5,-2)) - script.Parent.Torso.CFrame.p).unit*2)
hit,pos = workspace:FindPartOnRay(ray,script.Parent)
if hit then
print(hit.Name)
mag = (script.Parent.Torso.CFrame.p - pos).magnitude
script.Parent.Humanoid.Jump = true
end
end

Anyone with something better or any modifications to this?
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
09 May 2015 11:39 AM
bump
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
09 May 2015 02:34 PM
bump
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
09 May 2015 02:40 PM
local Torso = script.Parent:WaitForChild("Torso")

while true do
wait(0.5)
local ray = Ray.new(Torso.Position,Torso.CFrame.lookVector*2.3)
local hit,pos = workspace:FindPartOnRay(ray,script.Parent,false,true)
if hit then
script.Parent:WaitForChild("Humanoid").Jump = true
end
end


I script -~ chimmihc
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
10 May 2015 01:29 AM
Ah, thank you, it works perfectly.
Report Abuse
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
10 May 2015 06:59 AM
hi deaf
watchu doin here


[INSERT WONDERFUL SIGGY HERE]
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
10 May 2015 07:04 AM
gte out noob
Report Abuse
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
10 May 2015 07:35 AM
omg u so mean


[INSERT WONDERFUL SIGGY HERE]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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