Quite new to scripting, hoping to create some sort of camera which a player can view which will track the part when it moves such as when the rocket goes up, the camera goes up as well.
Anyone know where I can start off, been trying to look everywhere but I can’t seem anything regarding this matter.
Alright I did some working in studio and I found out how to make it lock to the part
(oh yeah and @Pokemoncraft5290 mentioned I was giving the wrong info, thanks!)
If you want to see the result yourself, just put an Anchored part in workspace, and paste the code accordingly!
Here is the code
Making the part launch up to space:
-- should be in serverscriptservice
for i = 0, 100, 1 do
wait()
game.Workspace.Part.CFrame *= CFrame.new(0, 1, 0)
end
Making the camera lock to the part:
-- should be in starterplayerscripts (and also should be a local script)
local cam = workspace.Camera
cam.CameraType = Enum.CameraType.Track
cam.CameraSubject = workspace.Part