Rocket.Touched:Connect(function(N)if not Exploded and(not IGNORE_LIST[string.lower(N.Name)]and(not N:IsDescendantOf(FiredCharacter)or GetReflectedByPlayer()))then Explode((Rocket.CFrame*CFrame.new(0,0,-Rocket.Size.Z/2)).p)end end)ExplodeEvent.OnServerEvent:Connect(function(N,U)local F=(Rocket.Position-U).magnitude if F<50 or F>5000 then Explode(U)end end)
--Register touched events.
Rocket.Touched:Connect(function(TouchPart)
	if
		not Exploded
		and not IGNORE_LIST[string.lower(TouchPart.Name)]
		and (not TouchPart:IsDescendantOf(FiredCharacter) or GetReflectedByPlayer())
	then
		Explode((Rocket.CFrame * CFrame.new(0, 0, -Rocket.Size.Z / 2)).p)
	end
end)

ExplodeEvent.OnServerEvent:Connect(function(Player, Position)
	local PositionDelta = (Rocket.Position - Position).magnitude
	if PositionDelta < 50 or PositionDelta > 5000 then
		Explode(Position)
	end
end)
