Stogee
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 24 |
|
|
| 04 Apr 2016 08:10 PM |
Hello, I am stuck in a game I'm developing and haven't been able to find anything as an example..
Basically I want my player to be able to pull a part from inventory (I can figure this out ok) And then be able to place the part on the ground and snap it into place kinda like you do when developing in studio.
Can someone point me to what I need to research in order to learn this?
Thank you! |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 08:12 PM |
http://wiki.roblox.com/index.php?title=Property#Lag_in_the_Real_World http://wiki.roblox.com/index.php?title=Vector3 http://wiki.roblox.com/index.php?title=Instance_(table)
#code print("Why did Adele cross the road?") wait(3) print("To say hello from the other side!") |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 08:13 PM |
^
the '_(table)' is part of the link for the instance
#code print("Why did Adele cross the road?") wait(3) print("To say hello from the other side!") |
|
|
| Report Abuse |
|
|
Stogee
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 24 |
|
| |
|
|
| 04 Apr 2016 08:18 PM |
np
#code print("Why did Adele cross the road?") wait(3) print("To say hello from the other side!") |
|
|
| Report Abuse |
|
|
Stogee
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 24 |
|
|
| 04 Apr 2016 08:20 PM |
| I can't believe how simple that was. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 08:31 PM |
don't listen to anything expensive says:
you'd just need the mouses hit position
which is mouse.Hit.p
http://wiki.roblox.com/index.php?title=API:Class/Mouse/Hit
.p is Position
you'd set the parts position to that, and then floor the x y and z to snap it to only whole numbers. you can do it with 1/5ths or any other number too but that requires math and i'm too stupid for that
|
|
|
| Report Abuse |
|
|
| |
|
Stogee
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 24 |
|
|
| 04 Apr 2016 08:38 PM |
| Nice, I will play with that also. Really good stuff. Thank you much. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 09:08 PM |
i swear this is the last thing i will get wrong today
#code print("Why did Adele cross the road?") wait(3) print("To say hello from the other side!") |
|
|
| Report Abuse |
|
|