wait() mouse = game.Players.LocalPlayer:GetMouse() cam = workspace.CurrentCamera cam.CameraType = 'Scriptable' mouse.Button1Down:connect(function() wait() mouse.Move:connect(function() cam.CoordinateFrame = CFrame.new(mouse.X/15,30, mouse.Y/15)*CFrame.fromEulerAnglesXYZ(-90,0,0) end) end) mouse.Button1Up:connect(function() wait() -- bit I can't figure out end)
Hi, this has really stumped me.
I'm mostly a beginner so I don't know what's going wrong. The idea behind this is a top down camera that is moved based on the mouse's position when MB1 is down, and "frozen" in place after MB1 is lifted.
I have it working so it moves the camera when I press MB1 and move the mouse, but I can't figure out a way to freeze it.
I've tried: replicating a part and locking the camera's focus and coordinateframe to it replicating the position of the camera replicating the position of the mouse and probably a couple more things I can't think of
I'm sure this is something simple that I should have seen...