local rocket = script.Parent

if rocket.Parent == workspace then
	for i = 1, 50 do
		wait(0.03)
		rocket.Position = rocket.Position + Vector3.new(0, 0.5, 0)
	end
end
local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
print(randomPlayer)
script.Parent:WaitForChild("RocketPropulsion").Target = randomPlayer.Character.HumanoidRootPart
script.Parent:WaitForChild("RocketPropulsion"):fire()
rocket.Touched:Connect(function(hit)
	if hit ~= rocket and not rocket.Parent:FindFirstChild(hit.Name) then
		local explode = Instance.new("Explosion")
		explode.Parent = workspace
		explode.Position = rocket.Position
		rocket:Destroy()
		end
end)

The Start is too make the Missile Move Upwards but after that the line

local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]

and after that doesn't run Its also a normal script under the rocket/missile

2 comments

0

what is the rocked parent?

0

workspace