Hey, I am making a mini nuke that explodes when you touch part. It works, but when it expands, it always keeps touching the top of the baseplate and doesn't go through the baseplate. How can I stop this from happening? Here is my script:
notBeenTouched = true
wait(4)
function onTouch(hit)
HumanoidIsTrue = hit.Parent:FindFirstChild("Humanoid")
if notBeenTouched and HumanoidIsTrue then
notBeenTouched = false
NukeBall = Instance.new("Part", Workspace)
function onBombTouch(Hit)
Hit:BreakJoints()
end
NukeBall.Touched:connect(onBombTouch)
NukeBall.Shape = "Ball"
NukeBall.BrickColor = BrickColor.new("Deep orange")
NukeBall.CanCollide = false
notBeenTouched = false
NukeBall.Anchored = true
NukeBall.Position = Vector3.new(0, 0, 0)
for i = 5, 100, 5 do
print(i)
NukeBall.Size = Vector3.new((i), (i) ,(i))
wait(0.1)
end
NukeBall.Transparency = 0.5
wait(0.5)
NukeBall.Transparency = 1
NukeBall:remove()
notBeenTouched = true
end
end
script.Parent.Touched:connect(onTouch)

2 comments
Hey, thanks for answering! I don't have enough reputation to give you +1, but when I do I will :)
Okay, and no problems that's why I'm here. (To help/get rep <3)