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.
01 | local TweenService = game:GetService( "TweenService" ) |
02 | local player = game.Players.LocalPlayer |
03 | local camera = workspace.CurrentCamera |
04 | player.CharacterAdded:Wait() |
05 | camera.CameraType = Enum.CameraType.Scriptable |
07 | function CameraMove(pos 1 , pos 2 , tweenbool) |
09 | if tweenbool = = true then |
12 | local info, posnx = TweenInfo.new( |
14 | Enum.EasingStyle.Back, |
15 | Enum.EasingDirection.Out, |
20 | CFrame = CFrame.new(pos 1 , pos 2 ) |
22 | local tween = TweenService:Create(camera, info, posnx) |
23 | camera.CameraType = Enum.CameraType.Scriptable |
27 | CameraMove(workspace.Camera 1. Position, workspace.SpawnLocate.LightPart.Position, false ) |
29 | game.ReplicatedStorage.Events.BindableEvents.PlayerPressedPlay.Event:Connect( function () |