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

Previous Thread :: Next Thread 
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 06:09 AM
How can i get this part to move with the mouse on like a 0.2 stud incrememnts, currently its quite jumpy

mouse.Move:connect(function()
if s == true then
local mh = mouse.Hit
if mouse.Target ~= selector then
selector.CFrame = CFrame.new(mh.p)
end
end
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 06:18 AM
bbbbb
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 06:38 AM
b
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
13 Apr 2015 06:48 AM
you could use 'BodyPosition' I guess, that will make the part fly to the mouse position, it won't jump anymore c:
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
13 Apr 2015 06:49 AM
math.floor(a*5)*0.2
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 06:50 AM
@Above, where do i put that elunate?
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 07:04 AM
b
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 07:15 AM
bb
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 07:24 AM
bbb
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 07:31 AM
bbbbbbbb
Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
13 Apr 2015 07:36 AM
mouse.Move:connect(function()
if s == true then
local mh = mouse.Hit
if mouse.Target ~= selector then
selector.CFrame = CFrame.new(math.floor(mh.p.x*5)*0.2, math.floor(mh.p.y*5)*0.2, math.floor(mh.p.z*5)*0.2)
end
end



Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
13 Apr 2015 08:38 AM
I don' think that works
Report Abuse
ActualGaming is not online. ActualGaming
Joined: 05 Apr 2015
Total Posts: 69
13 Apr 2015 11:10 AM
I think you have to make it ignore that part, perhaps with raycasting.

The problem might be that your mouse's target is always the "selector" part, unless you move your mouse off the part. But when you do so, the selector will move farther than you want it to when your mouse moves.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
13 Apr 2015 11:14 AM
http://wiki.roblox.com/index.php?title=API:Class/Mouse/TargetFilter

mouse.TargetFilter = part


I script -~ chimmihc
Report Abuse
ActualGaming is not online. ActualGaming
Joined: 05 Apr 2015
Total Posts: 69
13 Apr 2015 11:16 AM
ye or that, no need for raycasting then xD
thx
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