|
| 17 Jun 2017 10:30 AM |
Just curious.
print("hello fourm") |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 10:34 AM |
local rs=game:GetService("RunService") local player=game.Players.LocalPlayer local mouse=player:GetMouse() local part=workspace.Part
mouse.TargetFilter=part
rs.RenderStepped:Connect(function() part.Position=mouse.Hit.p end) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 10:38 AM |
bumpity
print("hello fourm") |
|
|
| Report Abuse |
|
|
| |
|
Vangief
|
  |
| Joined: 28 May 2017 |
| Total Posts: 66 |
|
|
| 17 Jun 2017 04:20 PM |
| easy. Just use mouse hit, its a cframe though. im sure you can make it into a vector3. ########################################################## |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 04:20 PM |
| You got an answer. Stop bumping. Mouse.Hit projects the mouse position into the 3D landscape giving you a position to move the brick to. |
|
|
| Report Abuse |
|
|
Vangief
|
  |
| Joined: 28 May 2017 |
| Total Posts: 66 |
|
|
| 17 Jun 2017 04:20 PM |
| ########################################################## |
|
|
| Report Abuse |
|
|
Vangief
|
  |
| Joined: 28 May 2017 |
| Total Posts: 66 |
|
|
| 17 Jun 2017 04:21 PM |
| wiki.roblox.com/index.php?title=API:Class/Mouse/Hit |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2017 10:13 AM |
Mouse.Hit returns a CFrame value of the mouse's coordinates.
Mouse.Hit.p returns a Vector3 value of the mouse's coordinates.
Mouse.Hit.p returns the position of the mouse in the 3d space. |
|
|
| Report Abuse |
|
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 18 Jun 2017 10:24 AM |
game.Players.LocalPlayer:GetMouse().Move:connect(function() Part.CFrame = mouse.Hit end) |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2017 10:26 AM |
@kojo
It's better to use a RenderStepped event or a BindToRenderStep function. |
|
|
| Report Abuse |
|
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 18 Jun 2017 10:33 AM |
@Gomlsauresrex
I like using the move function because on the player's screen, stuff is smooth but not for others because other people render at different times
But thanks though, there is barely a difference, In this case I dont think it should matter |
|
|
| Report Abuse |
|
|