I can't find out how CFraming works... the best I can do is
1 | function onTouch(hit) |
2 | if hit.Parent:findFirstChild( "Humanoid" ) then |
3 | for I = 1 , 50 do |
4 | script.Parent.Position = script.Parent.Position+Vector 3. new( 0 , 0.5 , 0 ) |
5 | --but if there's a part in the way, it teleports to the top of that part. |
6 | end |
7 | end |
8 | end |
Please help!
Use CFrame
to position the part while ignoring the collisions of other parts.
1 | function onTouch(hit) |
2 | if hit.Parent:findFirstChild( "Humanoid" ) then |
3 | for I = 1 , 50 do |
4 | script.Parent.CFrame = CFrame.new( 0 , 0.5 , 0 ) |
5 | end |
6 | end |
7 | end |