Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Need help tracking a players head with a part, i tried body gyros, positionings and CFrames, Anyone?

Asked by 4 years ago
local Char = game.Players.LocalPlayer.Character
wait(2)
while wait() do
    workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
    workspace.CurrentCamera.CFrame = workspace.CamPart.CFrame
    workspace.CamPart.CFrame = Char.Head.CFrame -- I had body gyros and positionings going into the cam part but the output says my head was nil might have to put if Head ~= nil then functions but idk someone help? --
end
0
Yes, that does track the players head (My answer) WideSteal321 773 — 4y
0
ok but can you read the thing TradingForDom 1 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

I'm assuming you want to make the camera follow the player? To do this simply set the CameraSubject to the Characters Humanoid, like this:

workspace.CurrentCamera.CameraSubject = Char.Humanoid;

Don't over complicate things!

0
Oh no, i want it to track the players heads TradingForDom 1 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

the part will go to the players head

game:GetService("RunService").Stepped:Connect(function(plr)
    workspace.PartName.Position = plr.Character.Head.Position
end)
0
pls upvote if this helped also u use normal script for this peytonallen920 66 — 4y
0
Thanks for this but I need its Orientation and cframe to track the players head, but now i can make something for my game! Thank you so much! TradingForDom 1 — 4y

Answer this question