VPF help (Trying to make a drone camera)

Well I have a problem with viewportframes, I’am trying to make DRONE camera with viewport frame but textures glitch.
Is there an way to avoid this Video

I’am cloning the map and destroying it from viewportframe every .01 sec ( Is there an better way of doing it that I don’t know and how to avoid this problem video again .)
I’am pretty new to VPF

Well that is happening because you are destroying the map and re-cloning it over and over again. Is there a reason for the cloning and destroying

Well is there an better way to do it

I cannot answer that question unless you tell me why you are doing it in the first place

just for fun nothing special, playing with VPF( trying to make a camera that follows the drone ) but i have that problem with textures

I know.

My question is:
why are you making the map get destroyed and cloned every 0.1 seconds?

Is it because you want the map to reload when a change is made InGame

Yea to refresh it cause alot of changes happen ( and alot buidlings exploding, parts moving)

1 Like

Okay. So there are three (or more… idk) solutions to this.

1. you can make a script listen for when a part’s properties are changed, then refresh the VPF.

2. just do not have property changing parts. To my knowledge, if you have a drone in your game, your game is probably an open world game (like Vehicle Simulator).

3. you can attach the player’s camera to the drone, instead of using VPFs

or even to refresh only cframe of parts
(thanks)

Yeah.

I would personally attach the camera to the drone.

Whenever the drone is activated, set the camera’s type to “Scriptable” then set the camera subject to “Drone” (or whatever the drone is called)

If you want a code block, I could try writing one. However, I’m on my phone rn in Florida lol

Yea I know how to do it but I want to make it with uis