What is Problem
I change camera CFrame and I want to show my avater face to everyone, But it always looks random. So I want to make it to face camera
This is camera code
local remotevent = game.ReplicatedStorage.RemoteEvents
local player = game.Players.LocalPlayer
local Camera = game.Workspace.CurrentCamera
local LookAt = game.Workspace.Cameras.ItSpawn
remotevent.ItDeploy.OnClientEvent:Connect(function()
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = LookAt.CFrame
end)
This is teleport code
if game:GetService("Players"):FindFirstChild(ItName) then
local Theplayer = player:FindFirstChild(ItName)
local Character = Theplayer.Character
Character:MoveTo(workspace:WaitForChild('Teleporters'):WaitForChild("ItSpawn").Position + Vector3.new(0, 0 ,0))
local humanoid = Character:WaitForChild("Humanoid")
humanoid.JumpPower = 0
humanoid.WalkSpeed = 0
end
Where’s the part of the code where you fire the remote event?
Also, try changing your server code to this:
if game:GetService("Players"):FindFirstChild(ItName) then
local Theplayer = player:FindFirstChild(ItName)
local Character = Theplayer.Character
Character:MoveTo(workspace:WaitForChild('Teleporters'):WaitForChild("ItSpawn").Position)
Character.HumanoidRootPart.CFrame = CFrame.lookAt(Character.HumanoidRootPart.Position, workspace.Cameras.ItSpawn.CFrame.Position)
local humanoid = Character:WaitForChild("Humanoid")
humanoid.JumpPower = 0
humanoid.WalkSpeed = 0
end
Ok i will try that script.
And i fire remote event like this,
game.ReplicatedStorage.RemoteEvents.ItDeploy:FireAllClients()
if game:GetService("Players"):FindFirstChild(ItName) then
local Theplayer = player:FindFirstChild(ItName)
local Character = Theplayer.Character
Character:MoveTo(workspace:WaitForChild('Teleporters'):WaitForChild("ItSpawn").Position + Vector3.new(0, 0 ,0))
local humanoid = Character:WaitForChild("Humanoid")
humanoid.JumpPower = 0
humanoid.WalkSpeed = 0
end
Ok so if i do Character.HumanoidRootPart.CFrame = CFrame.lookAt(Character.HumanoidRootPart.CFrame.Position, workspace.Cameras.ItSpawn.CFrame.Position)
But it doesnt work to player…