uh, so i made a thing where you can rotate a scrollpaper by moving your mouse and holding it down.
It's erroring, since it requires a CFrame, thingy..
It's in a ViewPortFrame, and the currentcamera for it is in the workspace but the scroll is parented to the viewport frame
local mouse = game.Players.LocalPlayer:GetMouse()
local moving = false
local pressed = false
local runService = game:GetService("RunService")
mouse.Button1Down:Connect(function()
pressed = true
end)
mouse.Move:Connect(function()
moving = true
end)
mouse.Button1Up:Connect(function()
pressed = false
moving = false
end)
runService.RenderStepped:Connect(function()
if moving and pressed then
script.Parent.MeshPart.CFrame = script.Parent.MeshPart.CFrame * CFrame.new(math.rad(mouse.Hit.p.X), math.rad(mouse.Hit.p.Y), 0)
end
end)

4 comments
hmm so what exactly are you using this for im a bit confused
Mouse.Hit.
What are you trying to say about mouse.hit??
Mouse.Hit correlates to the CFrame. Though most use it to reference the Positional component ".p/.Position.".