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

Cant set camera back to player?

Asked by 4 years ago
Edited 4 years ago

I've tried a bunch of methods, different pages, but I just CANT seem to get the camera to move back to the player! Please try to get back to me asap, it's stressing me out. this is my LOCAL script and its inside of starter player scripts.

01local TweenService = game:GetService("TweenService")
02local player = game.Players.LocalPlayer
03local camera = workspace.CurrentCamera
04player.CharacterAdded:Wait()
05camera.CameraType = Enum.CameraType.Scriptable
06 
07function CameraMove(pos1, pos2, tweenbool)
08    local spd = 0
09    if tweenbool == true then
10        spd = 5
11    end
12    local info, posnx = TweenInfo.new(
13        spd,
14        Enum.EasingStyle.Back,
15        Enum.EasingDirection.Out,
View all 31 lines...
0
is it for a start screen sameb556 -12 — 4y
0
Yes. rookiecookie153 53 — 4y

2 answers

Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
4 years ago

There are two methods you could use to reset the camera: First, you can destroy the Camera object and I believe it should reset. If it doesn't, you can set the CameraType to Custom and set the CameraSubject to the player's humanoid.

0
It wouldnt reset the camera if i were to destroy i believe, because its setting the cframe once. Also ive tried the "CameraType to Custom and set the CameraSubject to the player's humanoid." and it didnt work ;-; rookiecookie153 53 — 4y
0
Im glad you atleast tried to help rookiecookie153 53 — 4y
Ad
Log in to vote
0
Answered by
0Vyp 14
4 years ago

You should just be able to set the camera type back to custom if i'm not mistaken. So the script should look like this:

01local TweenService = game:GetService("TweenService")
02local player = game.Players.LocalPlayer
03local camera = workspace.CurrentCamera
04player.CharacterAdded:Wait()
05camera.CameraType = Enum.CameraType.Scriptable
06 
07function CameraMove(pos1, pos2, tweenbool)
08    local spd = 0
09    if tweenbool == true then
10        spd = 5
11    end
12    local info, posnx = TweenInfo.new(
13        spd,
14        Enum.EasingStyle.Back,
15        Enum.EasingDirection.Out,
View all 31 lines...
0
I tried that but it didnt work. i think its a bug because all of these type of questions have been answered rookiecookie153 53 — 4y
0
Thank you for helping anyways rookiecookie153 53 — 4y
0
Not a problem, hope you figure out whats wrong. 0Vyp 14 — 4y

Answer this question