When a part is resized, it works the same as trying to change the position of a part into another part instead of using CFrame, this causes it to move to the very top of the parts on-contact. Now, how do we solve this problem? We must continuously put the - In this case - NukeBall CFramed into a position.
It seems that you want the NukeBall at position (0,0,0). So, we fix this by instead of doing NukeBall.Position = Vector3.new(0,0,0)
, we use CFrame which ignores collision, NukeBall.CFrame = CFrame.new(0,0,0)
.
Finished Code Bellow, Please toss a Plus 1 rep and accept this answer if this helps and comment any questions or problems to this answer! :
04 | HumanoidIsTrue = hit.Parent:FindFirstChild( "Humanoid" ) |
05 | if notBeenTouched and HumanoidIsTrue then |
06 | notBeenTouched = false |
07 | NukeBall = Instance.new( "Part" , Workspace) |
08 | function onBombTouch(Hit) |
11 | NukeBall.Touched:connect(onBombTouch) |
12 | NukeBall.Shape = "Ball" |
13 | NukeBall.BrickColor = BrickColor.new( "Deep orange" ) |
14 | NukeBall.CanCollide = false |
15 | notBeenTouched = false |
16 | NukeBall.Anchored = true |
17 | NukeBall.CFrame = CFrame.new( 0 , 0 , 0 ) |
20 | NukeBall.Size = Vector 3. new((i), (i) ,(i)) |
21 | NukeBall.CFrame = CFrame.new( 0 , 0 , 0 ) |
24 | NukeBall.Transparency = 0.5 |
26 | NukeBall.Transparency = 1 |
32 | script.Parent.Touched:connect(onTouch) |