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

Parts not going through each other?

Asked by 8 years ago

What's supposed to happen:

Two parts go through each other.

What is happening:

When the first part reaches the second part it automatically goes on top of it.

The script:

for move = -81, 96, 1 do
script.Parent.Position = Vector3.new(move, 15.8, -97.8)
wait(0.1)
end

The script works fine, it moves foward. I thought "Well maybe CanCollide is set to true." But both part's CanCollide is false, but they won't go through each other. Help??

2 answers

Log in to vote
1
Answered by
LostPast 253 Moderation Voter
8 years ago

They won't go through eachother for 1 very simple reason. Changing the position of the part will make them move in a way that they won't go through eachother. you have to change the CFrame.

for move = -81, 96, 1 do
script.Parent.CFrame = CFrame.new(Vector3.new(move, 15.8, -97.8))
wait(0.1)
end
Ad
Log in to vote
0
Answered by 8 years ago

Try setting CanCollide to true with the part that your moving and set the part that is standing still to false?

Answer this question