So my plane i'm working on I'm adding a bomb feature but for some reason on line 187 (I took a snippet of the code so you don't have to go through all of that) its detected as a nil value when all its doing is, is trying to find the part named BombLoc
code
local bombspawn = script.Parent.Parent.Parent.Parent:FindFirstChild("Design"):FindFirstChild("BombLoc") -- error
function bomb()
if bombreload == true then
print'reloading bombs'
else
local bb = game.ServerStorage.Bomb:Clone()
bb.Parent = game.Workspace
bb.Position = CFrame.new(bombspawn.Position)
bombreload = true
wait(15)
bombreload = false
end
end
function KeyDown(k)
if (k == "w" or k:byte() == 17) then
throttle.up = (true and not dead)
elseif (k == "s" or k:byte() == 18) then
throttle.dn = (true and not dead)
elseif (k == "g" and not properties.autoLandingGear and not dead) then
ToggleLandingGear()
elseif (k == "b" and properties.pushback and not dead) then
TogglePushback()
elseif (k == "f" and bombreload == false) then
bomb()
end
end
