Whenever I start the game it does everything correctly except anchor the player's character on the cam part. It goes right through the code for anchoring the player's character so no errors, it just doesn't work like it should. My first thought was, maybe the camera isn't loaded in or something so I had it wait till the camera loaded in but that didn't work. So I'm here. Thx in advance for any help. server script in ServerScriptService
game.Players.PlayerAdded:Connect(function(plr)
for _, Spawn in pairs(workspace.Spawns:GetChildren()) do
if Spawn.Available.Value then
Spawn.Available.Value = false
game.ReplicatedStorage.Events.Spawn:FireClient(plr, Spawn)
break
end
end
end)
game.ReplicatedStorage.Events.Spawn.OnServerEvent:Connect(function(plr, Spawn)
game.ReplicatedStorage.Events.Spawn:FireClient(plr, Spawn)
end)
My LocalScript in StarterPlayerScripts (look to line 6)
local Sp
game.ReplicatedStorage.Events.Spawn.OnClientEvent:Connect(function(Spawn)
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = Spawn.Cam.CFrame
local S = Spawn.Spawn
Sp = Spawn
repeat wait() until game.Players.LocalPlayer.Character
repeat wait() until game.Players.LocalPlayer.Character:FindFirstChild('Humanoid')
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(S.Position.X, S.Position.Y + 15, S.Position.Z))
end)
while true do
repeat wait() until game.Players.LocalPlayer.Character
if game.Players.LocalPlayer.Character:WaitForChild('Humanoid').Health <= 0 and game.Players.LocalPlayer.PlayerGui.StartScreen.Enabled then
wait(5)
game.ReplicatedStorage.Events.Spawn:FireServer(Sp)
end
end

2 comments
i cant fully answer this right now because im really tired but what i can tell fast is that setting the cameras cframe to another object sets it to the way the object is facing, you can check that in part properties
Yes, I know that. The part is set to face the direction I need it to. The problem is that the camera CFrame doesn't actually go onto the part. It runs straight through that line and does everything else