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

How do I change the parent and the position in a script?

Asked by 6 years ago

I don't know how to do this

here's the script:

1local cloned = item:Clone()
2  local cloned2 = item:Clone()
3---Here's were it should be
4 
5 
6 end
7end)
1
.Parent = [new parent] .Position = [new vector3 position] User#5423 17 — 6y
4
Maybe you should do some research before asking this question. User#25115 0 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago

To change the parent you need to set it by saying cloned.Parent = and some place. To change the position Vector3.new should work.

Script:

01local cloned = item:Clone()
02 local cloned2 = item:Clone()
03 
04cloned.Parent = game.--where u want it
05cloned2.Parent = game.--where u want it
06 
07cloned.Position = Vector3.new(x, y, z) --position
08cloned2.Position = Vector3.new(x, y,  z) --position
09 
10 
11 end
12end)
0
thank WideSteal321 773 — 6y
Ad
Log in to vote
1
Answered by 6 years ago
1cloned2.Parent = *parent here*
2cloned2.Position = Vector3.new(pos x, pos y, pos z)

Answer this question