You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
so the head is normal im first person but when i go into first person it just go randomly very fast
What is the issue? Include screenshots / videos if possible!
the issue is the head moving randomly while on first person
issue video:
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
no
-- script to move head
script.Parent.LookCamera.OnServerEvent:Connect(function(mh,CameraDirection52)
if Player:FindFirstChild("Humanoid") then
if Player:FindFirstChild("Humanoid").Health ~= 0 then
Player.HeadLookPosition.Value = Vector3.new(CameraDirection52.X,CameraDirection52.Y,CameraDirection52.Z)
end
end
end)
camPart.Position = Player.Head.Position
camPart.CFrame = CFrame.new(camPart.Position,Player.HeadLookPosition.Value) * CFrame.fromOrientation(0, math.pi, 0)
-- camPart.CFrame = CFrame.new(camPart.Position,Player.Head.Position)
camPart.Position = Player.Head.Position
--localscript to move head for the server
repeat wait(.1)
until game.Players.LocalPlayer.Character:FindFirstChild("Head")
game["Run Service"].RenderStepped:Connect(function()
local camera = workspace.CurrentCamera.CFrame.Position
local cameralol = workspace.CurrentCamera.CoordinateFrame * CFrame.fromOrientation(0, math.pi, 0)
script.Parent.LookCamera:FireServer(camera)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
ok
local Game = game
local Workspace = workspace
local RunService = Game:GetService("RunService")
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Head = Character:WaitForChild("Head")
local Neck = Head:WaitForChild("Neck")
local Camera = Workspace.CurrentCamera
local function OnRenderStep()
Neck.C0 = CFrame.new(Neck.C0.Position) * Camera.CFrame.Rotation
end
RunService.RenderStepped:Connect(OnRenderStep)
im the video the head following camera is FE which FE means that show for the server i think but ok but i didn’t ask you to do a whole code, pls dont do that or else im gonna get punished i think
@Forummer, theres a camerapart when u rotate it it will rotate the head like its the own camera, is theres any script that can work by rotation or something like that that can show for the server tell me some tips and not a whole code lol
--LOCAL
local Game = game
local Workspace = workspace
local ReplicatedStorage = Game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local RunService = Game:GetService("RunService")
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Head = Character:WaitForChild("Head")
local Neck = Head:WaitForChild("Neck")
local Camera = Workspace.CurrentCamera
local function OnRenderStep()
Neck.C0 = CFrame.new(Neck.C0.Position) * Camera.CFrame.Rotation
RemoteEvent:FireServer(Neck.C0)
end
RunService.RenderStepped:Connect(OnRenderStep)
--SERVER
local Game = game
local ReplicatedStorage = Game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.RemoteEvent
local function OnRemoteFired(Player, NeckC0)
local Character = Player.Character
if not Character then return end
local Head = Character:FindFirstChild("Head")
if not Head then return end
local Neck = Head:FindFirstChild("Neck")
if Neck then Neck.C0 = NeckC0 end
end
RemoteEvent.OnServerEvent:Connect(OnRemoteFired)