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

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

Asked by 5 years ago
Edited 5 years ago

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.)

0
can we get the full script? theking48989987 2147 — 5y
0
Is this the whole script? Cause if not you need to define what character is aswell as the part Bl_ueHistory 94 — 5y
0
This is all they gave me epicwither36 -5 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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
0
I'm pretty sure you can just assign a two parameter CFrame? DeceptiveCaster 3761 — 5y
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? epicwither36 -5 — 5y
Ad

Answer this question