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

How do u move unions correctly ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago
Edited 8 years ago
script.Parent.Position = Vector3.new(0.2, 0, 0)
wait() -- or wait(0.01) doesn't matter
script.Parent.Position = Vector3.new(0, 0, 0)

How do u move unions properly ? this should move it forward and back to the SAME position. How u do it ? cuz for me it just goes somewhere where i can't see anymore

2 answers

Log in to vote
1
Answered by
FiredDusk 1466 Moderation Voter
8 years ago

Use CFrame, would explain more but on tablet. So.. script.Parent.CFrame = CFrame.new(POSITION HERE)

0
noooo thats not what i meant i dont want to change its position i want to just move it like forward and backward but not into a specific position Bulvyte 388 — 8y
Ad
Log in to vote
1
Answered by 8 years ago

When using position like this you move it to a certain set of co-ordinates in your place. To move it forward or backward, use CFrame like this:

script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0.2,0,0)
wait()
script.Parent.CFrame = script.Parent.CFrame - Vector3.new(0.2,0,0)
0
it works, but my union somewhy just flyes away when i shoot and its anchored Bulvyte 388 — 8y

Answer this question