Hey,
In the video fragment below I tried to do the GTA V camera spawning thingy where if you join, your camera comes from the sky to the player, because why not?
Overall, it works. I just have this small issue at the last part of the system.
As you saw in the video, it works. But at the end, you see that the camera stops above the head of the player (which is normal) but then it rotates automatically? I didn’t script it so it rotates 90 degrees at the very end. At the end of the script, we’re destroying all the unnecessary things such as the client script (because we don’t need to use it anymore)
Camera Tweening:
--Functions
function Cutscene(Part1, Part2, CutsceneTime)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = Part1.CFrame
local TweenInformation = TweenInfo.new(CutsceneTime, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0)
local Tween = TweenService:Create(Camera, TweenInformation, {CFrame = Part2.CFrame})
Tween:Play()
end
if Player.PlayerGui.Screen.Frame.BackgroundTransparency >= 1 and Player.PlayerGui.Screen.Frame.Label.TextTransparency >= 1 then
task.wait(0.5)
Cutscene(DefinedPart.Cam1, DefinedPart.Cam2, 1)
task.wait(1)
Cutscene(DefinedPart.Cam2, DefinedPart.Cam3, 1)
task.wait(1)
Cutscene(DefinedPart.Cam3, Player.Character.HumanoidRootPart.CamPart, 1)
task.wait(2)
Sender:FireServer("Loaded")
Camera.CameraType = Enum.CameraType.Custom
script:Destroy()
end
The DefinedPart is the part where the player spawns at (in GTA V you always spawn in random parts of the map.)
Is there any fix for this?
Thank you in advance!