CFrame not working?

I’ve made is so when a player joins the reserved server it will put the camera back to the players camera.

I know the defining is right but the CFrame just wont work??

It says CFrame is not a valid member of Humanoid. (players.WaterCanxiety.Humanoid
(WaterCanxiety = LocalPlayer for reference)

code: (local script)

local Players = game:GetService("Players")


local ScreenGui = game.Players.LocalPlayer.PlayerGui.ScreenGui
local MenuMusic = game.SoundService["Distorted Reality Perception - Leon Riskin"]
local Camera = workspace.CurrentCamera
local Players = game:GetService("Players")
local player = game.Players.LocalPlayer
local Char = player.Character or player.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
local reserve = game.Players.LocalPlayer.PlayerGui.ScreenGui.PlayFrame.GameTypeButton1

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() 
	print("reserved is true for ClientSide")
	ScreenGui.Enabled = false
	repeat wait ()
		Camera.CameraType = Enum.CameraType.Scriptable
	until Camera.CameraType == Enum.CameraType.Scriptable
	Camera.CameraSubject = Humanoid
	Camera.CFrame = game.Players.LocalPlayer.Character:WaitForChild('Humanoid').CFrame
	MenuMusic.Playing = false

end)

Change this to HumanoidRootPart

1 Like

I don’t think Humanoid has a CFrame Property. You’re setting the Camera’s CFrame to nil, essentially

1 Like

This does allow me to change the camera but the HumanoidRootPart remains idle or position (CFrame) locked so it’s not going to the current camera. I’ve tried custom camera type though not with the current settings so ill see if that works possibly but thats default and im using scriptable so i can manipulate it.

i tried using head as well instead of humanoidrootpart.

I get this but when I look at the Workspace Camera is shows the camera’s subject as humanoid, and you can technically set it to CFrame, with enough trying probably, though not in my circumstances im sure. (im probably wrong)
Though if you can set a subject to humanoid when it doesn’t really exist in physical form then maybe? but i see your point.

I did a little test in another place.

SOLUTION CODE:

local Players = game:GetService("Players")


local ScreenGui = game.Players.LocalPlayer.PlayerGui.ScreenGui
local MenuMusic = game.SoundService["Distorted Reality Perception - Leon Riskin"]
local Camera = workspace.CurrentCamera
local Players = game:GetService("Players")
local player = game.Players.LocalPlayer
local Char = player.Character or player.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
local reserve = game.Players.LocalPlayer.PlayerGui.ScreenGui.PlayFrame.GameTypeButton1

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() 
	print("reserved is true for ClientSide")
	ScreenGui.Enabled = false
	repeat wait ()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom
	Camera.CameraSubject = Humanoid
	MenuMusic.Playing = false

end)