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

Make a camera follow an object?

Asked by
xdeno 187
6 years ago

Hi, there's many scripts that have a camera that follow a player, except what I want is a camera to follow an object named "ball" which corresponds to a soccer ball to make a TV kind of system but I'm unsure of how to get the camera to follow the ball instead of my character, if anyone could help I'd be really grateful.

2 answers

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

Use CameraSubject.

local cam = workspace.CurrentCamera
cam.CameraSubject = workspace.Part

More info here. Please accept answer if this helped!

0
make sure it is set to scriptable as well, for more effects abnotaddable 920 — 6y
0
Yes. Forgot to add. PyccknnXakep 1225 — 6y
0
Thanks, but what I'm looking for is a fixed camera point that points the direction of where the ball is and that doesn't follow it's every move. xdeno 187 — 6y
Ad
Log in to vote
1
Answered by 6 years ago
Edited 6 years ago
local cam = workspace.CurrentCamera
cam.CameraSubject = workspace.YourPart
cam.CameraType = Enum.CameraType.Scriptable

or you can watch these vids to help https://www.youtube.com/watch?v=bkDp4fRbVZU&t=2s

https://www.youtube.com/watch?v=AOTEg91eXAc

https://www.youtube.com/watch?v=LdwNqyknyPU

0
You could format your code aswell... PyccknnXakep 1225 — 6y
0
i just did lol User#16474 0 — 6y
0
has he replied yet??? User#16474 0 — 6y
0
Thanks, but what I'm looking for is a fixed camera point that points the direction of where the ball is and that doesn't follow it's every move. xdeno 187 — 6y

Answer this question