Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would one make a brick always face a player? (Also sorry that I couldn't figure out the answer.)

So basically I have a script that my friend gave me and I cant get it to work! I'm not sure if it works cause I cant get it to work! Here is the script he gave me. part.CFrame = CFrame.new(part.Position, character.HumanoidRootPart.Position) (Please be simple because im new.)

3 comments

0

can we get the full script?

0

Is this the whole script? Cause if not you need to define what character is aswell as the part

0

This is all they gave me

1 answer

use this

part.CFrame = character.HumanoidRootPart.CFrame:ToWorldSpace(2,0,0)

The last 3 arguments of ToWorldSpace are relative coordinates that will be added to the character's position, you can change them until you have the position you want.

This will only work once, so the part will not follow the player, if you want to make the part follow the player put it in a loop

Like this

while wait() do
	part.CFrame = character.HumanoidRootPart.CFrame:ToWorldSpace(2,0,0)
end

2 comments

0

I'm pretty sure you can just assign a two parameter CFrame?

0

Alright im sorry, but I am super freaking new and I dont know what any of this means. So could you explain a little more?

This discussion is preserved as it was. New answers, comments, and votes are closed.