Keltrin
|
  |
| Joined: 01 Jan 2014 |
| Total Posts: 2085 |
|
|
| 27 Dec 2016 09:18 PM |
so I have the mouse
local mouse = game.Players.LocalPlayer:GetMouse()
and I have a part with a bodyvelocity in it (Same localscript)
local part = Instance.new("Part", workspace) part.CanCollide = false part.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart:GetRenderCFrame() if not part:FindFirstChild("BodyVelocity") then local velocity = Instance.new("BodyVelocity", part) velocity.Name = "BodyVelocity" velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) -- Problem here end
How would I make the velocity propel the part in the direction the mouse is pointing?
|
|
|
| Report Abuse |
|
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 27 Dec 2016 09:29 PM |
BodyVelocity.Velocity = Mouse.Hit.p
This is really buggy though because when you use it from different angles the mouse position changes a lot. I actually have the same issue myself.
|
|
|
| Report Abuse |
|
|
Keltrin
|
  |
| Joined: 01 Jan 2014 |
| Total Posts: 2085 |
|
| |
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 27 Dec 2016 10:47 PM |
y are u bumping i just told u.
|
|
|
| Report Abuse |
|
|
tbnj123
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 443 |
|
|
| 27 Dec 2016 10:54 PM |
| velocity.Velocity = mouse.Hit.lookVector*somespeed |
|
|
| Report Abuse |
|
|