Clone part not facing the way player facing

so I want to make a tool where it will clone part from ss to workspace, but somehow when clone part not facing the same as the player facing is there any help?

what i expected:
gambar

gambar

what blud did:
gambar
expected to be the way humanoidroot facing front

local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return end
-- Calculate the position in front of the player
local forwardDirection = humanoidRootPart.CFrame.LookVector
local newPosition = humanoidRootPart.Position + (forwardDirection * 7) 

gambar

2 Likes

Try reversing the forward direction so it becomes negative instead:
local forwardDirection = -humanoidRootPart.CFrame.LookVector

Characters in Roblox are designed to face the camera, which makes it called Look than FrontVector.

2 Likes

just rotate the part 180 degrees (it’s a mesh so it has weird Orientation, rotate it in studio (not via script) and place it back in replicated storage, see if that helps if not then just do what the above person said)

3 Likes

gambar
it makes the arrow behind the player :cry: ,the arrow should be infront of the player facing where the humanoidrootpart is facing which is to the left with the arrow pointing to the left, and i think it has smthing todo with LookAt but idk how todo it and how it works :v
true:
gambar

You could try flipping the emitters around(attachments maybe?) to see if the particles are facing the right direction. I don’t see how the emitters are set up.

2 Likes

I did it once and it didn’t work, btw for the emit particle I made it lockedpart= enabled ,its sure has smth to do with the part

1 Like

If you don’t want the part to be rotated, try using an attachment and placing the emitters on it and make sure it faces the right way(attachments, not the emitters this time.)

gambar
nope the particle still emitting not infront of th player

Another suggestion to consider is that you should change the orientation of the part to the HumanoidRootPart’s Orientation?

1 Like

set the arrows cframe to hrp cframe + hrp.CFrame.LookVector * number of studs and set the particle emitter emit direction to front i think

do you have an example script because I don’t understand what you mean by changing particle direction :blush:

1 Like

its in the particle emitter properties, i dont know its exact name

1 Like

srry still didnt work
part.CFrame = humanoidRootPart.CFrame + humanoidRootPart.CFrame.LookVector * part.Rotation.X

times the number of studs far away from the player, did you jsut leave it blank like that or did you not copy it

so for example * 10 for 10 studs away

Sorry but it still doesn’t work, the arrow is still facing the direction of the Part before being cloned, not the direction the player faces

nvm i just solved it this morning, its just a rotate thing Thanks for the helping guys ,and stepping by

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.