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

How do I clone something from lighting to workspace at a certain position?

Asked by 9 years ago

I know how to clone, ex: game.Lighting:clone() but I need to know how to clone that part from the lighting into workspace at a set position?

2 answers

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Well, one way is to position the item before you put it into Workspace. The other way is to use the MoveTo method.

Example:

game.Lighting.Part:clone().Parent = game.Workspace
game.Workspace.Part:MoveTo(Vector3.new(0,0,0))
Ad
Log in to vote
0
Answered by 9 years ago

Here you go should help.

local Object = game.Lighting["NAMEHERE"]:Clone()
Object.Parent = game.Workspace
--If Object is 1 part do.
Object.Position = Vector3.new() --Vector here or other Vector3 value.
--Elseif Object is a model do.
Object:MoveTo(Vecto3.new()) --Vector in there or other Vector3 value.
0
You misspelt Vector3 on line 6, just giving you a heads up. Spongocardo 1991 — 9y
0
the script goes off the page.. zachhg03 35 — 9y
0
Woops Vector3.new()*, But hey atleast you can understand it. xImmortalChaos 565 — 9y

Answer this question