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: .unit? Humanoid.TargetPoint?

Previous Thread :: Next Thread 
TygerMcEldra is not online. TygerMcEldra
Joined: 30 Nov 2009
Total Posts: 38
04 Oct 2011 05:16 PM
Getting started with some stuff I haven't used before. What does .Unit do? and how do I use .TargetPoint? Thanks
Report Abuse
Bergan is not online. Bergan
Joined: 23 Nov 2007
Total Posts: 4942
04 Oct 2011 05:19 PM
Im sorry.. IDK what that means. Targetpiont might be an area that the humanoid would go to. It might work with the :MoveTo function..... It can't be entered manually, I know that.
Report Abuse
TygerMcEldra is not online. TygerMcEldra
Joined: 30 Nov 2009
Total Posts: 38
04 Oct 2011 05:25 PM
Here is a snipit of code from where I found it, also, any word on .unit?

local targetPos = humanoid.TargetPoint
local lookAt = snap( (targetPos - character.Head.Position).unit )
local cf = CFrame.new(targetPos, targetPos + lookAt)
Report Abuse
Bergan is not online. Bergan
Joined: 23 Nov 2007
Total Posts: 4942
04 Oct 2011 05:28 PM
nah... I'm not THAT advanced, even though I've read a LUA book. TargetPos... that's seems familiar. I think that it is used in scripts for things that follow people, like zombies or RPG enemies...
Report Abuse
TygerMcEldra is not online. TygerMcEldra
Joined: 30 Nov 2009
Total Posts: 38
04 Oct 2011 05:31 PM
I solved my own question, TargetPoint = the Position your mouse is at when holding a tool. hmm...very useful. Do you know what math.Unit is used for?
Report Abuse
TygerMcEldra is not online. TygerMcEldra
Joined: 30 Nov 2009
Total Posts: 38
04 Oct 2011 05:32 PM
(that .unit question is to any one) Thank you for your time Bergan 8D
Report Abuse
Bergan is not online. Bergan
Joined: 23 Nov 2007
Total Posts: 4942
04 Oct 2011 05:34 PM
Glad to help... or atleast try. I forgot. It DOES have to do with cursors. I'll see if I can find anything with a unit function.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
04 Oct 2011 05:51 PM
TargetPoint is the point that the humanoids cursor is on. This only changes itself if it's a humanoid of a character of a player.
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