Teleportation Camera

so, I have this issue where once the player presses the Play button after 4 seconds the frame will fade in and it will teleport them, but the issue is that the camera does not follow when they are teleported.

local tween = game:GetService("TweenService")
local tweenspeed = 1
local info = TweenInfo.new(tweenspeed, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0)
local frame = script.Parent.Parent.Loading

script.Parent.PlayButton.MouseButton1Click:Connect(function()
	tween:Create(frame, info, {BackgroundTransparency = 0}):Play()
	wait(2)
	script.Parent.Parent.Camera.Disabled = true
	script.Parent.Parent.preLoader.Disabled = true
	wait(4)
	game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.TestingSpawnLocation.Position)
end)

You are teleporting the character itself. I would have a look on Camera Manipulation! :>

1 Like

alright, I will take a look at it.

I tried a bit and I got an error saying Position is not a valid member of Player

local tween = game:GetService("TweenService")
local tweenspeed = 1
local info = TweenInfo.new(tweenspeed, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0)
local frame = script.Parent.Parent.Loading
local camera = workspace.CurrentCamera.CFrame
local player = game.Players.LocalPlayer

script.Parent.PlayButton.MouseButton1Click:Connect(function()
	tween:Create(frame, info, {BackgroundTransparency = 0}):Play()
	wait(2)
	script.Parent.Parent.Camera.Disabled = true
	script.Parent.Parent.preLoader.Disabled = true
	wait(3)
	camera.CFrame = CFrame.new(player.Position)
	game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Workspace.TestingSpawnLocation.CFrame
end)

Player does not have a position property.
You might need to get it through player.Character.HumanoidRootPart.Position

I see, thanks for the help, I appreciate it.

feel free to say what you wanted to say

Are you setting your CameraType back to custom? Else your camera wont be attached to the character.

oh, I see, thanks for the help also.