here is the script
when fired the root part is supposed to face the cam's "lookvector"" but it dosent…….
local remote = game.ReplicatedStorage.onlockon
remote.OnServerEvent:Connect(function(plr,camera)
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")
char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.Position + Vector3.new(camera.lookVector.x,0,camera.lookVector.z))
end)
similar to shift lock but with the cams look vector...….
[EDITED]
it looks like this: https://gyazo.com/a6a7890cc98e333e99c10a41bff631e7

10 comments
is it firing? add a print after the connect to confirm that its firing and connecting as well.
Yes It Fires
is it connecting.
yes but when I press Shift to Fire it , the Character doent face where the camera is.it jsut faces backwards or a random direction.....
this part is off:char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.Position + Vector3.new(camera.lookVector.x,0,camera.lookVector.z))
try something like: CFrame = CFramePosition * CFrame.Angles
when locked on the black frames come down :D
Change the CFrame of the character on the client since client movement is replicated.
Oh really?
perhaps: CFrame.new(Vector3 pos, Vector3 lookAt) as opposed to CFrame.new(Vector3pos + Vector3lookat) ?