Hello everyone, I am trying to make a script that activates when the mouse button is clicked and it would turn the part to the mouse with CFrame.lookAt. The problem I have right now is that the part won’t tilt the right way it is supposed to.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local Lookpart = workspace.VFX:WaitForChild("lookpart")
local Mouse = player:GetMouse()
local mPosition = Mouse.Hit.Position
Mouse.Button1Up:Connect(function(player)
Lookpart.CFrame = CFrame.lookAt(Lookpart.Position, mPosition)
end)
The script is in a local script in the starter pack please give me some more intel about CFrame.lookAt so I won’t make the same mistake twice.
Thanks a lot