Hello, I am making a bomber plane. It uses tweenservice and I want to create and drop bombs once the plane hits a certain part. However, it doesnt seem to be working. Is there anything wrong with my code?? Thanks
local TweenService = game:GetService("TweenService")
local jet = script.Parent
local BombPart = Instance.new("Part")
--Tween stuff
local TweenInformation = TweenInfo.new(30,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
local partproperties = {Position = Vector3.new(1502.9, 211.582, 188.4)}
local tween = TweenService:Create(jet, TweenInformation, partproperties)
tween:Play()
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Finish" then
print("Bombs awayy")
end
end)
tween.Completed:Connect(function()
script.Parent:Destroy()
end)