#GPT-3.5 | Conversation #1119747274826862604
1 messages · Page 1 of 1 (latest)
in roblox studio this is my code```lua
function plrToStage(plr)
print("RESPAWN")
repeat wait() until plr.Character.HumanoidRootPart and plr.Character:FindFirstChild("HumanoidRootPart")
local stagePart = game.Workspace.Checkpoints:FindFirstChild(tostring(plr.leaderstats.Stage.Value)) --Find first part in checkpoint
local x,y,z = game.Workspace.Checkpoints:FindFirstChild(tostring(plr.leaderstats.Stage.Value)).Frame.CFrame:toOrientation()
local direction = CFrame.Angles(x,y+179,z)
local camera = workspace.CurrentCamera
local cameraDirection = CFrame.Angles(x,y+60,z)
plr.Character.HumanoidRootPart.CFrame = stagePart.Frame.CFrame + Vector3.new(0,2.5,0)
plr.Character:SetPrimaryPartCFrame(CFrame.new(plr.Character.PrimaryPart.Position, plr.Character.PrimaryPart.Position + direction.LookVector))
print("Apply camera angle")
workspace.CurrentCamera = CFrame.new(plr.Character.PrimaryPart.Position, plr.Character.PrimaryPart.Position + cameraDirection.LookVector)
print("Camera angle applied")
end```
I'm trying to change the camera angle but it doesn't seem to work. How can I fix this?