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

Position of clone?

Asked by
Mystdar 352 Moderation Voter
10 years ago

When cloning things, like this:

local clone = game.Lighting.Bullet:clone()

How can you decide its position, please annotate any changes made Would this work?

local clone = game.Lighting.Bullet:clone()
move = script.Parent.Parent.Bullet
move.CFrame = CFrame.new(0,0,1)

1 answer

Log in to vote
2
Answered by
Sublimus 992 Moderation Voter
10 years ago

Your clone variable is the clone, I don't see why you added the move variable, it should just be:

local clone = game.Lighting.Bullet:clone() -- Clones the bullet
clone.Parent = game.Workspace -- Or whatever you want it parented to, but this parents it
clone.CFrame = CFrame.new(0,0,1) -- Sets the position of the bullet
0
Then I can use the other script you helped me on to move this correct? Mystdar 352 — 10y
0
You could, yes. Sublimus 992 — 10y
0
By using a then function or just putting it in Mystdar 352 — 10y
0
You could just put it in I presume. Sublimus 992 — 10y
View all comments (3 more)
0
Thanks, you wouldn't mind if I contact you if something goes wrong, right? Mystdar 352 — 10y
0
Of course I don't mind, it's what I'm here for. :) Sublimus 992 — 10y
0
Thanks! Mystdar 352 — 10y
Ad

Answer this question