I really want to know how to make a brick stare at me so I can make an enemy for my game. Could anybody help?
COMMUNITY QUESTION
I need a little bit of help. How do I make a brick face me?
1 answer
One of my ways of achieving this problem is by using Humanoid Root Part's CFrame, Position along with a Part's Position
-- [Declaration Section]
--\\ Game Services
local Player = game:GetService("Players").LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart");
--\\ Part Location
local Part = workspace.Part;
-- [Output Section]
repeat wait()
HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position, Part.Position);
until HumanoidRootPart.CFrame == CFrame.new(HumanoidRootPart.Position, Part.Position);
1 comment
0
Thank you for your help, but I copied and pasted it in, and the enemy wouldn't stare at me.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
I've looked all over the internet. on YouTube, on Google, on Here, Everywhere. I still couldn't find anything.
This might help a bit: http://wiki.roblox.com/index.php?title=CFrame#Properties
Try to write something yourself; we can help you if you something goes wrong or you get stuck.
Thanks :)
Sorry if I mess up or need help. I'm actually pretty new to scripting.
For the following script to work, there must be a Part named "Part" in
Workspace. This script must also be located in LocalScript. Since I have no idea on what your "Enemy" is, I cannot help you there unless you send me a picture of it.