So im making a game right now and have a thing of once u hold e on something it teleports you somewhere but the direction im facing isnt the direction I want it to face and even after rotating the part it still faces in the same direction somebody please help.
this is the direction I spawn but I want it to spawn in the direction of the arrow:
Would help if I could see the script, but try to set the CFrame to the Part’s CFrame not just
HRP.CFrame = CFrame.new(Part.Position)
It should be like:
HRP.CFrame = Part.CFrame + Vector3.new(0,2,0)
Then you can rotate the part until it shows correctly.
what would i do for this:
plr.Character.HumanoidRootPart.CFrame = workspace.PartTp.CFrame
1 Like
You can just say
plr.Character:MoveTo(workspace.PartTp.Position)
Would still not rotate the character properly.
If he wanted a certain Rotation he would need to use CFrame.Angles
1 Like
That’s more of a pain than it has to be.
1 Like
Then, how would you fix the issue?
Exactly what solved the issue…?
1 Like
Teleport and then rotate 90 degrees. I don’t know how, but I’d say just do:
rootpart.Position = NewPosition --RootPart is just the body part being teleported
rootpart.Orientation += Vector3.new(0, 90, 0)
This just sets the HumanoidRootParts CFrame to the same… as the Parts CFrame… I was talking about the Direction Part as it can be different
Still less of a pain than messing with CFrame.Angles to get the correct one imo.
1 Like
rootpart.CFrame = part.CFrame -- I think it's that easy