Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i make a part face towards the mouse?

script.Parent.Activated:Connect(function()
    local plr = game.Players.LocalPlayer
    local mouse = plr:GetMouse()
    local char = plr.Character
    local waited = char:FindFirstChild("asdsd")
local x = Instance.new("BodyVelocity",waited)
waited.Anchored = false
x.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
x.Velocity = mouse.Hit.LookVector * 23
waited.Orientation = mouse.Hit.LookVector.Orientation
wait(2)
waited:Destroy()
end)

1 answer

✓ Accepted answer
script.Parent.Activated:Connect(function()
	local plr = game.Players.LocalPlayer
	local mouse = plr:GetMouse()
	local char = plr.Character
	local waited = char:FindFirstChild("asdsd")
	local x = Instance.new("BodyVelocity",waited)
	waited.Anchored = false
	x.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	x.Velocity = mouse.Hit.LookVector * 23
	waited.CFrame = CFrame.new(waited.Position, mouse.Hit.Position) -- <<<<
	wait(2)
	waited:Destroy()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.