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

How can i make an object spawn a few studs away from the handle?

Asked by 5 years ago
clonedPart=Instance.new("Part")
clonedPart.Name = "cubicPart"
clonedPart.Material = "Neon"
clonedPart.BrickColor = BrickColor.new('Institutional white')
clonedPart.Size = Vector3.new(8,6,2)
clonedPart.Parent =game.Workspace
clonedPart.CFrame = tool.Handle.CFrame + Vector3.new(0,0,-3) --real area of concern

When I face towards negative z, then the brick spawns correctly, but if I face towards positive z, it spawns behind me.

0
Vector3 is based on worldspace and contains no rotation ABK2017 406 — 5y
0
what does that mean? EliteRayGawnX2 124 — 5y
0
Based on what ABK2017 said, it means that Vector3 is based on the studio position/co-ordinates. So no matter where u face, the part will always spawn at the given position. XviperIink 428 — 5y
0
So that means I have to make the block spawn based on the lookVector of the Handle? EliteRayGawnX2 124 — 5y

Answer this question