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

I need a little bit of help. How do I make a brick face me?

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?

6 comments

0

I've looked all over the internet. on YouTube, on Google, on Here, Everywhere. I still couldn't find anything.

0

Try to write something yourself; we can help you if you something goes wrong or you get stuck.

0

Thanks :)

0

Sorry if I mess up or need help. I'm actually pretty new to scripting.

0

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.

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.