Every time I run the Script, the character drops down while the HumanoidRootPart stays standing up. Is there a way to face the Character to the way I want it to face?
local players = game:GetService("Players") function VolunteerAdded(Volunteer) print(Volunteer.Name.." Has Joined the OutCross Volunteer Program".."..Spawning in Pod") wait() script.Parent.HumanoidRootPart.CFrame = script.Parent.Parent.SpawnPod.SpawnPoint.CFrame wait() script.Parent.HumanoidRootPart.Rotation = Vector3.new(0,180,0) end players.PlayerAdded:connect(VolunteerAdded) for _,Volunteer in pairs(players:GetPlayers()) do VolunteerAdded(Volunteer) end
Since I don't know your setup, I can't tell you the exact numbers for the rotation. But I can provide some insight on how to rotate the Character.
You can rotate the Character by manipulating the HumanoidRootPart's CFrame. This involves using the CFrame.Angles constructor. Simply multiply the object's CFrame by a CFrame.Angles measurement to rotate the object.
Note: CFrame.Angles takes in radians, not studs. Arguments should be in math.rad form
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function VolunteerAdded(Volunteer) print(Volunteer.Name.." Has Joined the OutCross Volunteer Program".."..Spawning in Pod") wait() local root = script.Parent.HumanoidRootPart local spawn = script.Parent.Parent.SpawnPod.SpawnPoint --Mess around with these numbers if it isn't rotated correctly root.CFrame = spawn.CFrame * CFrame.Angles(0,math.rad(180),0) end game.Players.PlayerAdded:connect(VolunteerAdded) for _,Volunteer in pairs(players:GetPlayers()) do VolunteerAdded(Volunteer) end end)