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

How do I make CFrame so that I can duplicate multiple blocks?

Asked by 6 years ago
Edited 6 years ago

So, I'm currently making a que line. Instead of: ~~~~~~~~~~~~~~~~~ hit.Parent.HumanoidRootPart.CFrame = CFrame.new(-26.3, 4.3, 116.3) ~~~~~~~~~~~~~~~~~ How do i make it so that instead of putting a position, I can just put a name of another block?

2 answers

Log in to vote
0
Answered by
zyrun 168
6 years ago
hit.Parent.HumanoidRootPart.CFrame = CFrame.new(NameOfAnotherBlock.Position) 
Ad
Log in to vote
1
Answered by
Leamir 3138 Moderation Voter Community Moderator
6 years ago

Hello, IPhoneDrew!

In your script, you can just use OtherBlock.CFrame

Example:

hit.Parent.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.OtherPart.CFrame) 

This will aways work(Will rotate the player too)

Good Luck with your games!

Answer this question