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

How would I create a brick relative to the characters position?

Asked by 8 years ago

I understand how to actually spawn the brick, but only at a certain area using XYZ things. I'm trying to get it to spawn right in front of the character, but I can't figure it out. Is there a specific function I need?

0
devSledome, this isn't a request, I am asking for how I would start it. And your's does not work, I don't need a block spawned inside the character. AltLaserthrasher1 13 — 8y
0
Check out this link: http://wiki.roblox.com/index.php?title=CFrame&redirect=no#toWorldSpace You can take the player's torso CFrame and multiply it by another CFrame. EzraNehemiah_TF2 3552 — 8y

2 answers

Log in to vote
3
Answered by 8 years ago
Edited 8 years ago
part.Position = CFrame.new(player.Position)

hi

This should put the brick in the same position as the character

Also this is a request so please don't request here.

0
Then why did you answer if it was a request. EzraNehemiah_TF2 3552 — 8y
0
For the karma devSeldom 40 — 8y
0
It's not a request, he's wondering what's the command for doing something, he didn't say "I need a script that does x y z now go and make one for me" Instead he wanted to know a specific command/concept and how to use it  PecolaFromScratch 20 — 7y
Ad
Log in to vote
0
Answered by 8 years ago

CFrames. Mess with them until you get what you want. Take this as an example:

Brick.CFrame = workspace.Player.PrimaryPart.CFrame * CFrame.new(0,0,0) --insert values (negatives too!)

Answer this question