I already searched up my issue and couldn't find a solution on both google, roblox wiki, or this site so bluetaslam do not lock this post
So I fixed one line of my code but it ended up showing an error in another line saying attempt to index upvalue 'bombspawn' (a nil value)
Line of code with the error
bb:MoveTo(bombspawn.BombLoc.Position)
whole block of code working with
local bombreload = false local bombspawn = script.Parent.Parent.Parent.Parent:FindFirstChild("Design") function bomb() if bombreload == true then print'reloading bombs' else local bb = game.ServerStorage.Bomb:Clone() bb.Parent = game.Workspace bb:MoveTo(bombspawn.BombLoc.Position) bombreload = true wait(15) bombreload = false end end
Check to see if you have too many parents or not enough parents on line 2. bombspawn may be nil because it couldn't find "Design"