Hello! When I use this block of code the player wont teleport
‘’'game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
wait(1)
local cutscenecams = game.Workspace.Cameraparts
local cutscenecamevent = game.ReplicatedStorage.CutsceneCamEvent
local returncutscene = game.ReplicatedStorage.ReturnCamEvent
task.wait(1.7)
player.Character.HumanoidRootPart.Position = Vector3.new(-1.171, 4.742, -227.654)
player.Character.HumanoidRootPart.Orientation = Vector3.new(0, 25, 0)
cutscenecamevent:FireAllClients(cutscenecams.Cam1.CFrame)
task.wait(1.3)
local animation = game.Workspace.Dummy:WaitForChild("Animation")
local humanoid = game.Workspace.Dummy:WaitForChild("Humanoid")
local animationplayer = humanoid:LoadAnimation(animation)
animationplayer:Play()
local animation2 = game.Workspace:WaitForChild("Animation")
local humanoird = player.Character:WaitForChild("Humanoid")
local animationplay = humanoid:LoadAnimation(animation2)
animationplay:Play()
end)
end)
‘’’