Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I detect camera movement?

Asked by 8 years ago

I went to the wiki for help, but I couldn't find an event that helped me with my problem.

1 answer

Log in to vote
4
Answered by 8 years ago
Edited 8 years ago

There is no camera moved event but you can use the changed event since the CFame is the camera position.

This is a local script:-

local cam = game.Workspace.Camera

cam.Changed:connect(function(propString)
    if propString == 'CFrame' then -- only look for the CFrame changed 
        print('Camera Moved', cam.CFrame)
    end
end)

There are other ways of doing this, but this uses the existing events that Roblox provides.

Hope this helps.

Ad

Answer this question