Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Touched a brick?

When I touch the part the part moves up so thats why I made a position.

x = script.Parent

x.Touched:connect(function()
	
	x.Size = x.Size + Vector3.new(1,1,1)
	x.Position.Vector3.new = -8, -1, -3 --Once it grows when you touch it, the part moves up so thats why I put this line there. So it can go back to its position.
end)

2 answers

✓ Accepted answer

Vector3 makes it not collide with any parts change it to CFrame for it to work

x.CFrame = CFrame.new(-8,-1,-3)

Whoa whoa whoa. This is wrong. Too wrong. The wiki. Readd the wiki!!!!

If you reference the wiki, you would've found this

workspace.Part.Position = Vector3.new(0, 50, 0)

So, for your part, we would do this...

x.Position = Vector3.new(-8, -1, -3)

But this shouldn't work. Why? Position is like the size you did. it offsets the position if it collides with a part. So we will have to use CFrame, that allows parts to collide with other parts and not be offsetted.

x.CFrame = CFrame.new(-8, -1, -3)

1 comment

0

It does not move back to that position.

This discussion is preserved as it was. New answers, comments, and votes are closed.