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: If Pointer over brick go, part will go to pointer?

Previous Thread :: Next Thread 
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
03 Feb 2016 10:08 PM

How would I make a brick go to where the mouse pointer is ONLY if its over a brick in workspace named HOVER_TRUE?
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
03 Feb 2016 10:16 PM
bump..
Report Abuse
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
03 Feb 2016 10:18 PM
http://wiki.roblox.com/index.php?title=API:Class/Mouse/Target
You can probably figure the rest out from here.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
03 Feb 2016 10:21 PM
local part = game.Workspace.Test

local mouse = game.Players.LocalPlayer:GetMouse()

local pos = part.Position

mouse.Move:connect(function()
if mouse.Target then
if mouse.Target.Name == "HOVER_TRUE" then
part.Position = mouse.Target.Position
else
if mouse.Target.Name ~= part.Name then
part.Position = pos
end
end
end
end)



#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
03 Feb 2016 10:22 PM
Ah cheers!
Another quick question.. Is it possible to say that the Part going to the Pointer can only be placed on a stud, so its like in studio If I was to have '1 stud' enabled?
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