Firespider Posted March 29, 2023 Share Posted March 29, 2023 Hello! I had a problem and I would like to solve it if the player presses it backspace on the keyboard, the camera view is restored, but I can't solve it. I tried Destroy Element, but it's not good. Thanks in advance if anyone can help! function OpenWindow() if (page == 1) then setPlayerHudComponentVisible("all", false) showChat(false) camera = setCameraMatrix( 2149.77148, -1148.25977, 24.41226) Veh1 = createVehicle(402, 2154.45996, -1153.21362, 23.87550) bindKey("BACKSPACE", "Down", function() destroyElement(camera) end) end end Link to comment
Doongogar Posted March 29, 2023 Share Posted March 29, 2023 (edited) try setCameraTarget there is no way to destroy the camera, with destroyElement, because it is not an element Edited March 29, 2023 by SciptNovato Link to comment
Firespider Posted March 29, 2023 Author Share Posted March 29, 2023 Thanks bro! It works Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now