#how to cframe 😭

5 messages · Page 1 of 1 (latest)

proven prairie
#
task.wait(2)
local plr = script.Parent.Parent
local char = plr.Character
local hrp = char:WaitForChild("HumanoidRootPart")
local head = char:WaitForChild("Head")
local cam = game.Workspace.CurrentCamera
local uis = game:GetService("UserInputService")

local mouse = plr:GetMouse()
local updated = false
local mouseDelta = nil

cam.CameraType = Enum.CameraType.Scriptable
local newpart = Instance.new("Part")


uis.InputChanged:Connect(function(inputObject)
    mouseDelta = inputObject.Delta
    uis.MouseBehavior = Enum.MouseBehavior.LockCenter
    cam.CFrame = hrp.CFrame:ToWorldSpace(CFrame.new(5,2,8))
    cam.CFrame = CFrame.new(cam.CFrame.Position,mouseDelta)
end)

how do i make the last line of the function use the second vector not as a position but as a rotation? Help im lost

weary copper
#

You could probably just set the orientation and position values instead of doing cframes if they’re a little hard for now

proven prairie
#

how do i do orientation

#

i cant make it face towards the place they clicked

#

@weary copper